Skip to content

Commit

Permalink
Monitoring (Influxdb) service
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev committed Dec 2, 2023
1 parent 7858b19 commit 252acd9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Depending on which optional services you start:
| API docs | http://localhost:8089/ |
| Chessground | http://localhost:8090/demo.html |
| PGN Viewer | http://localhost:8091/ |
| InfluxDB | http://localhost:8086/ |

## Usage

Expand Down
8 changes: 8 additions & 0 deletions command/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,14 @@ fn prompt_for_optional_services() -> Result<Vec<OptionalService<'static>>, Error
"Berserk",
"Python API client",
)
.item(
OptionalService {
compose_profile: vec!["monitoring"].into(),
repositories: None,
},
"Monitoring",
"Metric collection using InfluxDB",
)
.item(
OptionalService {
compose_profile: None,
Expand Down
1 change: 1 addition & 0 deletions conf/lila-ws.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ include "application"

mongo.uri = "mongodb://mongodb:27017/lichess?appName=lila-ws"
redis.uri = "redis://redis"
kamon.influxdb.hostname = "influxdb"

csrf.origin = ${?SCHEME}"://"${?LILA_DOMAIN}
5 changes: 5 additions & 0 deletions conf/lila.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ swiss.bbpairing = "/opt/bbpPairings/bbpPairings.exe"

prismic.api_url = "https://lichess.cdn.prismic.io/api"

kamon.enabled = true
kamon.influxdb.hostname = "influxdb"
kamon.influxdb.authentication.token = "secret"
# api.influx_event.endpoint = "http://influxdb:8086/write?db=events"

plan.stripe.keys.public = "pk_test_123"
plan.stripe.keys.secret = "sk_test_123"
plan.payPal.keys.public = "sb"
20 changes: 19 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ services:
context: docker
dockerfile: lila-fishnet.Dockerfile
environment:
- HTTP_API_LOGGER=true
# - HTTP_API_LOGGER=true
- KAMON_ENABLED=true
- REDIS_HOST=redis
restart: unless-stopped
networks:
Expand Down Expand Up @@ -245,6 +246,23 @@ services:
depends_on:
- mongodb

influxdb:
image: influxdb:2.7.4-alpine
restart: unless-stopped
ports:
- 8086:8086
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=admin
- DOCKER_INFLUXDB_INIT_PASSWORD=password
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=secret
- DOCKER_INFLUXDB_INIT_ORG=lila-docker
- DOCKER_INFLUXDB_INIT_BUCKET=kamon
networks:
- lila-network
profiles:
- monitoring

networks:
lila-network:
driver: bridge

0 comments on commit 252acd9

Please sign in to comment.