From 0d4cb139152c37c6833591944bf75450a1c51676 Mon Sep 17 00:00:00 2001 From: Ashley <8253488+mrjones-plip@users.noreply.github.com> Date: Thu, 25 Apr 2024 13:34:58 -0700 Subject: [PATCH] feat(#81): replace deprecated SQL exporter with non-deprecated one (#100) * Replace deprecated SQL exporter with non-deprecated one per #81 * remove comments to clean up yaml file * default to local cht-couch2pg db values in example * set example yaml file to actually work with default couch2pg settings * set min_interval 60s which means calls happening <60s hit cache instead DB directly * remove config file that shouldn't have been committed * update git ignore, place holder for prom scrape * omg get entry command and file name correct * got prometheus scrape config working \o/ * adding scrape config * finalize dashboard, update example sql, remove comments from scrape, change gauge -> counter * add dev restart script, update detail dashboard json * start to get dev and test environs to work * normalize passwords for sql and couch2pg * feat(na): path to new compose file in CI, update readme how to add new sql * feat(na): fix path to ci test files * feat(na): update git ignore to include test fake file * fix(na): add set -e and fake cht to restart script per feedback --- .env.example | 7 +++ .gitignore | 1 + development/README.md | 10 ++-- .../fake-cht/docker-compose.fake-cht.yml | 4 +- .../example-config/postgres-instances.yml | 5 -- .../example-config/postgres_exporter.yml | 10 ---- .../fake-cht/example-config/sql_servers.yml | 29 +++++++++ development/fake-cht/src/postgres.js | 4 +- development/kill.start.ips.sh | 60 +++++++++++++++++++ development/tests/integration/utils/config.js | 8 +-- development/tests/integration/utils/docker.js | 4 +- docker-compose.yml | 2 - exporters/postgres/compose.yml | 17 ++++++ exporters/postgres/config/cht-queries.yml | 17 ------ exporters/postgres/config/scrape_config.yml | 18 ------ exporters/postgres/couch2pg_collector.yml | 22 +++++++ .../docker-compose.postgres-exporter.yml | 32 ---------- .../postgres/postgres-instances.example.yml | 5 -- .../postgres/postgres_exporter.example.yml | 10 ---- exporters/postgres/scrape.yml | 4 ++ exporters/postgres/sql_servers_example.yml | 29 +++++++++ .../dashboards/CHT/cht_admin_details.json | 21 ++++--- .../dashboards/CHT/cht_admin_overview.json | 32 +++++----- 23 files changed, 212 insertions(+), 139 deletions(-) delete mode 100644 development/fake-cht/example-config/postgres-instances.yml delete mode 100644 development/fake-cht/example-config/postgres_exporter.yml create mode 100644 development/fake-cht/example-config/sql_servers.yml create mode 100755 development/kill.start.ips.sh create mode 100644 exporters/postgres/compose.yml delete mode 100644 exporters/postgres/config/cht-queries.yml delete mode 100644 exporters/postgres/config/scrape_config.yml create mode 100644 exporters/postgres/couch2pg_collector.yml delete mode 100644 exporters/postgres/docker-compose.postgres-exporter.yml delete mode 100644 exporters/postgres/postgres-instances.example.yml delete mode 100644 exporters/postgres/postgres_exporter.example.yml create mode 100644 exporters/postgres/scrape.yml create mode 100644 exporters/postgres/sql_servers_example.yml diff --git a/.env.example b/.env.example index ca3e3ba..b086b92 100644 --- a/.env.example +++ b/.env.example @@ -16,3 +16,10 @@ PROMETHEUS_VERSION=latest # Note: Relative paths do not work with docker-compose v2.x. In that case, simply use an absolute path. PROMETHEUS_DATA="./prometheus/data" PROMETHEUS_RETENTION_TIME=60d + + +# Use 0.0.0.0 to expose to LAN/Internet, use 127.0.0.1 to +# use with reverse proxy (Caddy, Traefik etc) +SQL_EXPORTER_IP=127.0.0.1 +# 9399 is default from upstream project +SQL_EXPORTER_PORT=9399 diff --git a/.gitignore b/.gitignore index e1b371a..e6d733f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ postgres_exporter.yml grafana.ini delete-rules.yml build +exporters/postgres/sql_servers.yml diff --git a/development/README.md b/development/README.md index 3a9f5af..d1e7220 100644 --- a/development/README.md +++ b/development/README.md @@ -61,7 +61,7 @@ Metrics loaded from the CHT `/monitoring` endpoint are configured via the json-e ### Adding a new metric from a Couch2pg Postgres DB -Metrics loaded from a Couch2pg Postgres DB are configured via the postgres-exporter's [`cht-queries.yml`](../exporters/postgres/config/cht-queries.yml) file. New entries into the file can specify the associated Postgres query for loading the metric data. See the [postgres_exporter project](https://github.com/prometheus-community/postgres_exporter) on GitHub for more information. +Metrics loaded from a Couch2pg Postgres DB are configured via the sql_exporter's [`couch2pg_collector.yml`](../exporters/postgres/couch2pg_collector.yml) file. New queries can be added by copying `couch2pg_collector.yml` into a new file following the `*_collector.yml` nomenclature. For example `reports-by-type_collector.yml` could be created with a new query to gather all CHW submitted reports. See the [sql_exporter project](https://github.com/burningalchemist/sql_exporter) on GitHub for more information. ### Scraping metrics from a new resource @@ -114,7 +114,7 @@ Copy the example config files: ```shell cp development/fake-cht/example-config/cht-instances.yml cht-instances.yml -cp development/fake-cht/example-config/postgres* ./exporters/postgres +cp development/fake-cht/example-config/sql_servers.yml ./exporters/postgres/. ``` You will also need to run a few additional commands from the [normal setup process](https://docs.communityhealthtoolkit.org/apps/guides/hosting/monitoring/setup/#setup) to prepare your new instance: @@ -129,13 +129,13 @@ mkdir -p grafana/data && mkdir -p prometheus/data From the root directory, run: ```shell -docker compose -f docker-compose.yml -f exporters/postgres/docker-compose.postgres-exporter.yml -f development/fake-cht/docker-compose.fake-cht.yml up -d +docker compose -f docker-compose.yml -f exporters/postgres/compose.yml -f development/fake-cht/docker-compose.fake-cht.yml up -d ``` The Postgres data will be persisted in a Docker volume. To clear the data when you are finished testing (to allow for a fresh environment on the next run), run your `docker compose down` command with the `-v` flag to delete the volume. ```shell -docker compose -f docker-compose.yml -f exporters/postgres/docker-compose.postgres-exporter.yml -f development/fake-cht/docker-compose.fake-cht.yml down -v +docker compose -f docker-compose.yml -f exporters/postgres/compose.yml -f development/fake-cht/docker-compose.fake-cht.yml down -v ``` ### Historical data @@ -149,7 +149,7 @@ Each test is associated with an `xlsx` file in this directory that contains the Start a fresh deployment of cht-watchdog without providing any CHT URL and with the test override: ``` -docker compose -f docker-compose.yml -f exporters/postgres/docker-compose.postgres-exporter.yml -f development/fake-cht/docker-compose.fake-cht.yml up -d +docker compose -f docker-compose.yml -f exporters/postgres/compose.yml -f development/fake-cht/docker-compose.fake-cht.yml up -d ``` Open the `xlsx` file of the test you want to run. Switch to the `data` sheet and Save As a `csv` file (named `data.csv`) in the `development` directory. diff --git a/development/fake-cht/docker-compose.fake-cht.yml b/development/fake-cht/docker-compose.fake-cht.yml index d464f39..9ece4d3 100644 --- a/development/fake-cht/docker-compose.fake-cht.yml +++ b/development/fake-cht/docker-compose.fake-cht.yml @@ -20,8 +20,8 @@ services: image: postgres:15 environment: POSTGRES_DB: cht - POSTGRES_USER: postgres_root - POSTGRES_PASSWORD: postgres_root_password + POSTGRES_USER: cht_couch2pg + POSTGRES_PASSWORD: cht_couch2pg_password volumes: - fake-cht-postgres-data:/var/lib/postgresql/data networks: diff --git a/development/fake-cht/example-config/postgres-instances.yml b/development/fake-cht/example-config/postgres-instances.yml deleted file mode 100644 index 2d07f5c..0000000 --- a/development/fake-cht/example-config/postgres-instances.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Update this data to point to your Postgres DB endpoint and your CHT instance. -# To monitor multiple instances, add additional entries to the outer list (target/labels pairs). -- targets: [postgres:5432/cht] - labels: - cht_instance: fake-cht:8081 diff --git a/development/fake-cht/example-config/postgres_exporter.yml b/development/fake-cht/example-config/postgres_exporter.yml deleted file mode 100644 index 8c138d9..0000000 --- a/development/fake-cht/example-config/postgres_exporter.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Configuration for Postgres Exporter. -# Add additional entries to auth_modules for each of your Postgres DB endpoints. -auth_modules: - postgres:5432/cht: # Needs to match the target URL in postgres-instances.yml - type: userpass - userpass: - username: postgres_root - password: postgres_root_password - options: - sslmode: disable diff --git a/development/fake-cht/example-config/sql_servers.yml b/development/fake-cht/example-config/sql_servers.yml new file mode 100644 index 0000000..e916fcb --- /dev/null +++ b/development/fake-cht/example-config/sql_servers.yml @@ -0,0 +1,29 @@ +# Global settings and defaults. +global: + # Subtracted from Prometheus' scrape_timeout to give us some headroom and prevent Prometheus from + # timing out first. + scrape_timeout_offset: 500ms + # Minimum interval between collector runs: by default (0s) collectors are executed on every scrape. + # Medic recommends setting this to 60s so that the endpoint cant be used as a proxy to DOS the upstream Postgres server + # see https://github.com/burningalchemist/sql_exporter/issues/447#issue-2144289744 for more info + min_interval: 60s + # Maximum number of open connections to any one target. Metric queries will run concurrently on + # multiple connections. + max_connections: 3 + # Maximum number of idle connections to any one target. + max_idle_connections: 3 + # Maximum amount of time a connection may be reused to any one target. Infinite by default. + max_connection_lifetime: 10m + +collector_files: + - "/etc/sql_exporter/couch2pg_collector.yml" + +jobs: + - job_name: db_targets + collectors: [couch2pg] + enable_ping: true + static_configs: + - targets: + # " same as URL in cht-instances.yml ": 'postgres://USERNAME:PASSWORD@DB_SERVER_IP/DATABASE + "fake-cht:8081": 'postgres://cht_couch2pg:cht_couch2pg_password@postgres:5432/cht?sslmode=disable' # //NOSONAR - password is safe to commit + diff --git a/development/fake-cht/src/postgres.js b/development/fake-cht/src/postgres.js index d9095e7..5091204 100644 --- a/development/fake-cht/src/postgres.js +++ b/development/fake-cht/src/postgres.js @@ -2,10 +2,10 @@ const { Client } = require('pg'); const { randomUUID } = require('crypto'); const POSTGRES_CLIENT_CONFIG = { - user: 'postgres_root', + user: 'cht_couch2pg', host: 'postgres', database: 'cht', - password: 'postgres_root_password', + password: 'cht_couch2pg_password', port: 5432, }; diff --git a/development/kill.start.ips.sh b/development/kill.start.ips.sh new file mode 100755 index 0000000..8fb9fb6 --- /dev/null +++ b/development/kill.start.ips.sh @@ -0,0 +1,60 @@ +#!/bin/bash +set -e +echo ' + , /-. + ((___/ __> + / } ---- CHT WATCHDOG RESTART SCRIPT ---- + \ .--.( + \\ \\ +' + +echo;echo "Killing...";echo +docker compose \ + -f docker-compose.yml \ + -f exporters/postgres/compose.yml \ + -f development/fake-cht/docker-compose.fake-cht.yml \ + kill + +echo;echo "Starting...";echo +docker compose \ + -f docker-compose.yml \ + -f exporters/postgres/compose.yml \ + -f development/fake-cht/docker-compose.fake-cht.yml \ + up -d \ + --remove-orphans + +# shellcheck disable=SC2046 +ips=$(docker inspect $(docker ps -q ) \ + --format='{{ printf "%-50s" .Name}} {{range .NetworkSettings.Networks}}{{.IPAddress}} {{end}}' \ + | tr "\/" " " | tr -s " " ) + +# shellcheck disable=SC2046 +readarray -t ipsArray <<< $(echo -e "${ips}") + +final="" +# loop it +for ipLine in "${ipsArray[@]}"; do + ip=$(echo "$ipLine" | cut -f3 -d" ") + name=$(echo "$ipLine" |cut -f2 -d" ") + case $name in + cht-watchdog-extra_sql_exporter-1) + portPath=":9187/metrics";; + cht-watchdog-grafana-1) + portPath=":3000";; + cht-watchdog-postgres-exporter-1) + portPath=":9187/metrics";; + cht-watchdog-json-exporter-1) + portPath=":7979/metrics";; + cht-watchdog-prometheus-1) + portPath=":9090/targets?search=";; + cht-watchdog-sql_exporter-1) + portPath=":9399/metrics";; + *) + portPath="";; + esac + final+="${name} http://${ip}${portPath}\n" +done + +echo;echo "Services:";echo +echo -e "${final}" | column -t +echo diff --git a/development/tests/integration/utils/config.js b/development/tests/integration/utils/config.js index 5af12e9..3cc7f1f 100644 --- a/development/tests/integration/utils/config.js +++ b/development/tests/integration/utils/config.js @@ -12,12 +12,8 @@ const initConfigFiles = async () => { `${ROOT_PATH}/cht-instances.yml` ); await copyIfNotExists( - `${ROOT_PATH}/development/fake-cht/example-config/postgres-instances.yml`, - `${ROOT_PATH}/exporters/postgres/postgres-instances.yml` - ); - await copyIfNotExists( - `${ROOT_PATH}/development/fake-cht/example-config/postgres_exporter.yml`, - `${ROOT_PATH}/exporters/postgres/postgres_exporter.yml` + `${ROOT_PATH}/development/fake-cht/example-config/sql_servers.yml`, + `${ROOT_PATH}/exporters/postgres/sql_servers.yml` ); await copyIfNotExists( `${ROOT_PATH}/grafana/grafana.example.ini`, diff --git a/development/tests/integration/utils/docker.js b/development/tests/integration/utils/docker.js index 78e16e1..4fc7544 100644 --- a/development/tests/integration/utils/docker.js +++ b/development/tests/integration/utils/docker.js @@ -7,14 +7,14 @@ const startWatchdog = async () => { await exec(`docker compose \ -f ${ROOT_PATH}/docker-compose.yml \ -f ${ROOT_PATH}/development/docker-compose.test-data.yml \ - -f ${ROOT_PATH}/exporters/postgres/docker-compose.postgres-exporter.yml \ + -f ${ROOT_PATH}/exporters/postgres/compose.yml \ up -d`); }; const stopWatchdog = async () => { await exec(`docker compose \ -f ${ROOT_PATH}/docker-compose.yml \ - -f ${ROOT_PATH}/exporters/postgres/docker-compose.postgres-exporter.yml \ + -f ${ROOT_PATH}/exporters/postgres/compose.yml \ down -v`); }; diff --git a/docker-compose.yml b/docker-compose.yml index ffb738c..79a814c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.9" - volumes: prometheus-data: driver: local diff --git a/exporters/postgres/compose.yml b/exporters/postgres/compose.yml new file mode 100644 index 0000000..e863505 --- /dev/null +++ b/exporters/postgres/compose.yml @@ -0,0 +1,17 @@ +services: + +# todo: uncomment and get this working + prometheus: + volumes: + - ./exporters/postgres/scrape.yml:/etc/prometheus/scrape_configs/cht-postgres.yml:ro + + sql_exporter: + restart: unless-stopped + image: burningalchemist/sql_exporter:latest + command: --config.file=/etc/sql_exporter/sql_servers.yml + volumes: + - "./exporters/postgres/:/etc/sql_exporter/" + ports: + - "${SQL_EXPORTER_IP:-127.0.0.1}:${SQL_EXPORTER_PORT:-9399}:9399" + networks: + - cht-watchdog-net diff --git a/exporters/postgres/config/cht-queries.yml b/exporters/postgres/config/cht-queries.yml deleted file mode 100644 index 2da82bd..0000000 --- a/exporters/postgres/config/cht-queries.yml +++ /dev/null @@ -1,17 +0,0 @@ -couch2pg_progress: - query: | - SELECT - substring(seq for position('-' in seq) - 1) as sequence, - substring(source from position('/' in source) + 1) as db - FROM - couchdb_progress - WHERE - source like '%/%' and - seq like '%-%' - metrics: - - db: - usage: "LABEL" - description: "Name of the database" - - sequence: - usage: "COUNTER" - description: "Latest update sequence of Couch db processed by couch2pg" diff --git a/exporters/postgres/config/scrape_config.yml b/exporters/postgres/config/scrape_config.yml deleted file mode 100644 index e1f653a..0000000 --- a/exporters/postgres/config/scrape_config.yml +++ /dev/null @@ -1,18 +0,0 @@ -scrape_configs: - - job_name: postgres - scrape_interval: 5m - metrics_path: /probe - file_sd_configs: - - files: - - '/etc/prometheus/postgres-instances.yml' - relabel_configs: - - source_labels: [__address__] - regex: "(.*)" - replacement: "postgresql://${1}" - target_label: __param_target - - source_labels: [__address__] - target_label: instance - - source_labels: [__address__] - target_label: __param_auth_module - - target_label: __address__ - replacement: postgres-exporter:9187 diff --git a/exporters/postgres/couch2pg_collector.yml b/exporters/postgres/couch2pg_collector.yml new file mode 100644 index 0000000..dbdfc72 --- /dev/null +++ b/exporters/postgres/couch2pg_collector.yml @@ -0,0 +1,22 @@ +collector_name: couch2pg + +queries: + - query_name: couch2pg-query + query: | + SELECT + substring(seq for position('-' in seq) - 1) as sequence, + substring(source from position('/' in source) + 1) as db + FROM + couchdb_progress + WHERE + source like '%/%' and + seq like '%-%' + +metrics: + - metric_name: couch2pg_progress_sequence + type: counter + help: 'couch2pg backlog.' + key_labels: + - db + values: [sequence] + query_ref: couch2pg-query diff --git a/exporters/postgres/docker-compose.postgres-exporter.yml b/exporters/postgres/docker-compose.postgres-exporter.yml deleted file mode 100644 index 148bfe3..0000000 --- a/exporters/postgres/docker-compose.postgres-exporter.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: "3.9" - -services: - prometheus: - volumes: - - ./exporters/postgres/postgres-instances.yml:/etc/prometheus/postgres-instances.yml:ro - - ./exporters/postgres/config/scrape_config.yml:/etc/prometheus/scrape_configs/cht-postgres.yml:ro - postgres-exporter: - image: prometheuscommunity/postgres-exporter:${POSTGRES_EXPORTER_VERSION:-v0.13.2} - 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' - environment: - - PG_EXPORTER_EXTEND_QUERY_PATH=/etc/postgres-exporter/queries.yml - volumes: - - ./exporters/postgres/postgres_exporter.yml:/etc/postgres-exporter/postgres_exporter.yml:ro - - ./exporters/postgres/config/cht-queries.yml:/etc/postgres-exporter/queries.yml:ro - networks: - - cht-watchdog-net - restart: always diff --git a/exporters/postgres/postgres-instances.example.yml b/exporters/postgres/postgres-instances.example.yml deleted file mode 100644 index ca1702d..0000000 --- a/exporters/postgres/postgres-instances.example.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Update this data to point to your Postgres DB endpoint and your CHT instance. -# To monitor multiple instances, add additional entries to the outer list (target/labels pairs). -- targets: [gamma.dev.medicmobile.org:5432/cht] - labels: - cht_instance: gamma.dev.medicmobile.org diff --git a/exporters/postgres/postgres_exporter.example.yml b/exporters/postgres/postgres_exporter.example.yml deleted file mode 100644 index fda9e9e..0000000 --- a/exporters/postgres/postgres_exporter.example.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Configuration for Postgres Exporter. -# Add additional entries to auth_modules for each of your Postgres DB endpoints. -auth_modules: - gamma.dev.medicmobile.org:5432/cht: # Needs to match the target URL in postgres-instances.yml - type: userpass - userpass: - username: postgres_readonly_user - password: postgres_readonly_password - options: - sslmode: disable diff --git a/exporters/postgres/scrape.yml b/exporters/postgres/scrape.yml new file mode 100644 index 0000000..564df5a --- /dev/null +++ b/exporters/postgres/scrape.yml @@ -0,0 +1,4 @@ +scrape_configs: + - job_name: sql_exporter + static_configs: + - targets: ['sql_exporter:9399'] diff --git a/exporters/postgres/sql_servers_example.yml b/exporters/postgres/sql_servers_example.yml new file mode 100644 index 0000000..1c15381 --- /dev/null +++ b/exporters/postgres/sql_servers_example.yml @@ -0,0 +1,29 @@ +# Global settings and defaults. +global: + # Subtracted from Prometheus' scrape_timeout to give us some headroom and prevent Prometheus from + # timing out first. + scrape_timeout_offset: 500ms + # Minimum interval between collector runs: by default (0s) collectors are executed on every scrape. + # Medic recommends setting this to 60s so that the endpoint cant be used as a proxy to DOS the upstream Postgres server + # see https://github.com/burningalchemist/sql_exporter/issues/447#issue-2144289744 for more info + min_interval: 60s + # Maximum number of open connections to any one target. Metric queries will run concurrently on + # multiple connections. + max_connections: 3 + # Maximum number of idle connections to any one target. + max_idle_connections: 3 + # Maximum amount of time a connection may be reused to any one target. Infinite by default. + max_connection_lifetime: 10m + +collector_files: + - "/etc/sql_exporter/couch2pg_collector.yml" + +jobs: + - job_name: db_targets + collectors: [couch2pg] + enable_ping: true + static_configs: + - targets: + # " same as URL in cht-instances.yml ": 'postgres://USERNAME:PASSWORD@DB_SERVER_IP/DATABASE + "172-17-0-1.local-ip.medicmobile.org:10464": 'postgres://cht_couch2pg:cht_couch2pg_password@172.17.0.1:5432/cht?sslmode=disable' # //NOSONAR - password is safe to commit + diff --git a/grafana/provisioning/dashboards/CHT/cht_admin_details.json b/grafana/provisioning/dashboards/CHT/cht_admin_details.json index 496f4eb..92f069e 100644 --- a/grafana/provisioning/dashboards/CHT/cht_admin_details.json +++ b/grafana/provisioning/dashboards/CHT/cht_admin_details.json @@ -474,7 +474,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "builder", - "expr": "couch2pg_progress_sequence{cht_instance=~\"$cht_instance\", db=~\"medic\"}", + "expr": "couch2pg_progress_sequence{target=~\"$cht_instance\", db=~\"medic\"}", "hide": false, "legendFormat": "__auto", "range": true, @@ -510,7 +510,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "builder", - "expr": "couch2pg_progress_sequence{cht_instance=~\"$cht_instance\", db=~\"medic-users-meta\"}", + "expr": "couch2pg_progress_sequence{target=~\"$cht_instance\", db=~\"medic-users-meta\"}", "hide": false, "legendFormat": "__auto", "range": true, @@ -545,7 +545,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "builder", - "expr": "couch2pg_progress_sequence{cht_instance=~\"$cht_instance\", db=~\"medic-sentinel\"}", + "expr": "couch2pg_progress_sequence{target=~\"$cht_instance\", db=~\"medic-sentinel\"}", "hide": false, "legendFormat": "__auto", "range": true, @@ -2508,14 +2508,21 @@ "type": "row" } ], - "refresh": "30s", "revision": 1, - "schemaVersion": 38, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { + "current": { + "selected": false, + "text": "disc-mali.ml", + "value": "disc-mali.ml" + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "definition": "query_result(up{job=~\"cht\"})", "hide": 0, "includeAll": false, @@ -2579,6 +2586,6 @@ "timezone": "", "title": "CHT Admin Details", "uid": "hkQUbyfVk", - "version": 42, + "version": 43, "weekStart": "" } diff --git a/grafana/provisioning/dashboards/CHT/cht_admin_overview.json b/grafana/provisioning/dashboards/CHT/cht_admin_overview.json index f269ab7..7ae8eff 100644 --- a/grafana/provisioning/dashboards/CHT/cht_admin_overview.json +++ b/grafana/provisioning/dashboards/CHT/cht_admin_overview.json @@ -106,7 +106,7 @@ "content": "# CHT Watchdog\n\nSee the [CHT documentation](https://docs.communityhealthtoolkit.org/apps/guides/hosting/monitoring/) for more information about monitoring and alerting!", "mode": "markdown" }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "type": "text" }, { @@ -181,7 +181,7 @@ "showHeader": false, "sortBy": [] }, - "pluginVersion": "9.5.3", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -374,7 +374,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -459,7 +459,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -546,7 +546,7 @@ "showThresholdLabels": false, "showThresholdMarkers": false }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -652,7 +652,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -776,7 +776,7 @@ "showUnfilled": true, "valueMode": "color" }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -881,7 +881,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -969,7 +969,7 @@ "showThresholdLabels": false, "showThresholdMarkers": false }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -1076,7 +1076,7 @@ "showThresholdLabels": false, "showThresholdMarkers": false }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -1193,7 +1193,7 @@ "showThresholdLabels": false, "showThresholdMarkers": false }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -1215,7 +1215,7 @@ }, "editorMode": "builder", "exemplar": false, - "expr": "sum(couch2pg_progress_sequence{cht_instance=~\"$cht_instance\", db=~\"medic|medic-sentinel|medic-users-meta\"})", + "expr": "sum(couch2pg_progress_sequence{target=~\"$cht_instance\", db=~\"medic|medic-sentinel|medic-users-meta\"})", "hide": false, "instant": true, "legendFormat": "__auto", @@ -1305,7 +1305,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -1482,7 +1482,7 @@ "showHeader": false, "sortBy": [] }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "category": "All categories", @@ -1670,7 +1670,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.0", + "pluginVersion": "10.1.1", "targets": [ { "datasource": { @@ -2340,6 +2340,6 @@ "timezone": "", "title": "CHT Admin Overview", "uid": "oa2OfL-Vk", - "version": 35, + "version": 36, "weekStart": "" }