Skip to content

Commit

Permalink
Merge pull request #2 from kurokobo/v8
Browse files Browse the repository at this point in the history
feat: bump automuteus version to 8.x
  • Loading branch information
kurokobo authored Feb 23, 2023
2 parents 565f33a + 9ceb52b commit 0f21883
Show file tree
Hide file tree
Showing 18 changed files with 538 additions and 395 deletions.
20 changes: 10 additions & 10 deletions grafana-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,28 @@ Create your `.env` file using `sample.env` in this repository as in the official
# - Json exporter (used as Galactus exporter): https://github.com/prometheus-community/json_exporter/releases
# - Node exporter: https://github.com/prometheus/node_exporter/releases
# - cAdvisor: https://github.com/google/cadvisor/releases
GRAFANA_TAG=8.4.5
PROMETHEUS_TAG=2.34.0
PROMETHEUS_GALACTUS_EXPORTER_TAG=0.4.0
PROMETHEUS_DOCKER_NODE_EXPORTER_TAG=1.3.1
PROMETHEUS_CADVISOR_TAG=0.39.3
GRAFANA_TAG=9.3.6
PROMETHEUS_TAG=2.42.0
PROMETHEUS_AUTOMUTEUS_EXPORTER_TAG=0.5.0
PROMETHEUS_DOCKER_NODE_EXPORTER_TAG=1.5.0
PROMETHEUS_CADVISOR_TAG=0.47.0

# Specify default username and password for Grafana
GRAFANA_USER=
GRAFANA_PASS=
GRAFANA_USER=admin
GRAFANA_PASS=Grafana123!
GRAFANA_EXTERNAL_PORT=3000
```

Now all you have to do is just start it. If you want to use full-featured version that includes the information from your Docker host (i.e. CPU load per Container, etc.), use `docker-compose.full.yml` instead.

```bash
# Start standard version.
docker-compose up -d
docker compose up -d

# Start full-featured version.
# To use this, you need to specify the name of the compose file by -f option
# not only when invoke "up" but also any other operations i.e. "ps", "logs", "down", etc.
docker-compose -f docker-compose.full.yml up -d
docker compose -f docker-compose.full.yml up -d
```

Within a few minutes, you can view Grafana at: `http://<your-docker-host>:3000/`.
Expand Down Expand Up @@ -119,7 +119,7 @@ By querying Galactus broker using HTTP, we can get a JSON strings including some
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: prometheus-galactus-exporter:7979
replacement: prometheus-automuteus-exporter:7979
```
### Gather from Docker host
Expand Down
26 changes: 14 additions & 12 deletions grafana-dashboard/docker-compose.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ services:
# - Build image from github directly
#build: https://github.com/automuteus/automuteus.git

# Uncomment to expose API
#ports:
# - ${API_PORT:-80}:${SERVICE_PORT}
restart: always
environment:
# These are required and will fail if not present
Expand All @@ -21,17 +24,20 @@ services:
- POSTGRES_PASS=${POSTGRES_PASS:?err}

# These Variables are optional
- WORKER_BOT_TOKENS=${WORKER_BOT_TOKENS:-}
- EMOJI_GUILD_ID=${EMOJI_GUILD_ID:-}
- CAPTURE_TIMEOUT=${CAPTURE_TIMEOUT:-}
- AUTOMUTEUS_LISTENING=${AUTOMUTEUS_LISTENING:-}
- AUTOMUTEUS_GLOBAL_PREFIX=${AUTOMUTEUS_GLOBAL_PREFIX:-}
- BASE_MAP_URL=${BASE_MAP_URL:-}
- SLASH_COMMAND_GUILD_IDS=${SLASH_COMMAND_GUILD_IDS:-}
- API_SERVER_URL=${API_SERVER_URL:-}
- API_ADMIN_PASS=${API_ADMIN_PASS:-}

# Do **NOT** change this
- REDIS_ADDR=${AUTOMUTEUS_REDIS_ADDR}
- GALACTUS_ADDR=${GALACTUS_ADDR}
# Do **NOT** change these
- REDIS_ADDR=${REDIS_ADDR}
- POSTGRES_ADDR=${POSTGRES_ADDR}
# - SHARDS=0,1
# - NUM_SHARDS=2
stop_grace_period: ${STOP_GRACE_PERIOD:-2m}
depends_on:
- redis
Expand All @@ -54,14 +60,10 @@ services:
- ${GALACTUS_EXTERNAL_PORT:-8123}:${BROKER_PORT}
restart: always
environment:
# This Variable is optional
- WORKER_BOT_TOKENS=${WORKER_BOT_TOKENS:-}

# Do **NOT** change these
- DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN:?err}
- BROKER_PORT=${BROKER_PORT}
- REDIS_ADDR=${GALACTUS_REDIS_ADDR}
- GALACTUS_PORT=${GALACTUS_PORT}
- REDIS_ADDR=${REDIS_ADDR}
# - NUM_SHARDS=2
depends_on:
- redis

Expand Down Expand Up @@ -105,8 +107,8 @@ services:
- ./prometheus/prometheus.full.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus

prometheus-galactus-exporter:
image: quay.io/prometheuscommunity/json-exporter:v${PROMETHEUS_GALACTUS_EXPORTER_TAG:?err}
prometheus-automuteus-exporter:
image: quay.io/prometheuscommunity/json-exporter:v${PROMETHEUS_AUTOMUTEUS_EXPORTER_TAG:?err}
restart: always
# should not be exported externally; uncomment for debugging / testing purposes only.
#ports:
Expand Down
26 changes: 14 additions & 12 deletions grafana-dashboard/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ services:
# - Build image from github directly
#build: https://github.com/automuteus/automuteus.git

# Uncomment to expose API
#ports:
# - ${API_PORT:-80}:${SERVICE_PORT}
restart: always
environment:
# These are required and will fail if not present
Expand All @@ -21,17 +24,20 @@ services:
- POSTGRES_PASS=${POSTGRES_PASS:?err}

# These Variables are optional
- WORKER_BOT_TOKENS=${WORKER_BOT_TOKENS:-}
- EMOJI_GUILD_ID=${EMOJI_GUILD_ID:-}
- CAPTURE_TIMEOUT=${CAPTURE_TIMEOUT:-}
- AUTOMUTEUS_LISTENING=${AUTOMUTEUS_LISTENING:-}
- AUTOMUTEUS_GLOBAL_PREFIX=${AUTOMUTEUS_GLOBAL_PREFIX:-}
- BASE_MAP_URL=${BASE_MAP_URL:-}
- SLASH_COMMAND_GUILD_IDS=${SLASH_COMMAND_GUILD_IDS:-}
- API_SERVER_URL=${API_SERVER_URL:-}
- API_ADMIN_PASS=${API_ADMIN_PASS:-}

# Do **NOT** change this
- REDIS_ADDR=${AUTOMUTEUS_REDIS_ADDR}
- GALACTUS_ADDR=${GALACTUS_ADDR}
# Do **NOT** change these
- REDIS_ADDR=${REDIS_ADDR}
- POSTGRES_ADDR=${POSTGRES_ADDR}
# - SHARDS=0,1
# - NUM_SHARDS=2
stop_grace_period: ${STOP_GRACE_PERIOD:-2m}
depends_on:
- redis
Expand All @@ -54,14 +60,10 @@ services:
- ${GALACTUS_EXTERNAL_PORT:-8123}:${BROKER_PORT}
restart: always
environment:
# This Variable is optional
- WORKER_BOT_TOKENS=${WORKER_BOT_TOKENS:-}

# Do **NOT** change these
- DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN:?err}
- BROKER_PORT=${BROKER_PORT}
- REDIS_ADDR=${GALACTUS_REDIS_ADDR}
- GALACTUS_PORT=${GALACTUS_PORT}
- REDIS_ADDR=${REDIS_ADDR}
# - NUM_SHARDS=2
depends_on:
- redis

Expand Down Expand Up @@ -105,8 +107,8 @@ services:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus

prometheus-galactus-exporter:
image: quay.io/prometheuscommunity/json-exporter:v${PROMETHEUS_GALACTUS_EXPORTER_TAG:?err}
prometheus-automuteus-exporter:
image: quay.io/prometheuscommunity/json-exporter:v${PROMETHEUS_AUTOMUTEUS_EXPORTER_TAG:?err}
restart: always
# should not be exported externally; uncomment for debugging / testing purposes only.
#ports:
Expand Down
Loading

0 comments on commit 0f21883

Please sign in to comment.