Skip to content

Commit

Permalink
Add watchdog config to start being able to port from superset to prom…
Browse files Browse the repository at this point in the history
…etheus/grafana (#104)

per [#77 over in
watchdog](medic/cht-watchdog#77)
  • Loading branch information
mrjones-plip authored Sep 1, 2023
1 parent 37bed5b commit 21b4371
Show file tree
Hide file tree
Showing 6 changed files with 723 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
.vscode/
node_modules/
secrets/
Expand Down
35 changes: 35 additions & 0 deletions watchdog-config/extra-sql-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
services:

prometheus:
volumes:
- ./app-monitoring-data-ingest/extra-sql-prometheus.yml:/etc/prometheus/scrape_configs/extra-sql-prometheus.yml:ro

grafana:
volumes:
- ./app-monitoring-data-ingest/extra-sql-dashboard.json:/etc/grafana/provisioning/dashboards/CHT/cht_admin_extra_sql.json:ro

extra_sql_exporter:
image: prometheuscommunity/postgres-exporter:latest
command:
# - '--config.file=/etc/postgres-exporter/postgres_exporter.yml'
# disables the collection of all metrics except for custom queries (https://github.com/medic/cht-watchdog/issues/70)
- '--no-collector.database'
- '--no-collector.postmaster'
- '--no-collector.process_idle'
- '--no-collector.replication'
- '--no-collector.replication_slot'
- '--no-collector.stat_bgwriter'
- '--no-collector.stat_database'
- '--no-collector.statio_user_tables'
- '--no-collector.stat_statements'
- '--no-collector.stat_user_tables'
- '--disable-default-metrics'
- '--disable-settings-metrics'
volumes:
- ./app-monitoring-data-ingest/extra-sql-queries.yml:/extra-sql-queries.yml
environment:
DATA_SOURCE_NAME: "postgresql://${EXTRA_SQL_USER:-NO DB USER SPECIFIED}:${EXTRA_SQL_PASS:-NO DB PASSWORD SPECIFIED}@${EXTRA_SQL_SERVER:-.NO DB SERVER SPECIFIED}:${EXTRA_SQL_PORT:-5431}/${EXTRA_SQL_DATABASE:-dwh_impact}?sslmode=disable"
PG_EXPORTER_EXTEND_QUERY_PATH: "/extra-sql-queries.yml"
restart: always
networks:
- cht-watchdog-net
Loading

0 comments on commit 21b4371

Please sign in to comment.