From 68065d98dd86fd6364a32c8c0f4ae7d5715514a1 Mon Sep 17 00:00:00 2001 From: Gil Hoggarth Date: Wed, 12 Apr 2023 14:35:02 +0100 Subject: [PATCH] dc dashboard --- .gitignore | 16 ++++++---------- monitor/beta/start_monitor.sh | 1 + monitor/dev/start_monitor.sh | 2 ++ .../provisioning/dashboards/dc_dashboard.json | 2 +- .../datasources/domain_crawl.yaml-template | 13 +++++++++++++ monitor/prod/start_monitor.sh | 1 + 6 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 monitor/grafana/provisioning/datasources/domain_crawl.yaml-template diff --git a/.gitignore b/.gitignore index 32030d8..f917f2f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,15 +20,11 @@ stat-pusher/beta[0-9]-*.[0-9]* stat-pusher/prod[0-9]-*.[0-9]* stat-pusher/monitor[0-9]-*.[0-9]* -*/alertmanager/config.yml -*/grafana/grafana.ini -*daily_dashboard.json -*/grafana/provisioning/datasources/frequent_crawl.yaml -*/grafana/provisioning/datasources/prometheus.yaml -*/prometheus/prometheus.yml +monitor/alertmanager/config.yml +monitor/grafana/grafana.ini +monitor/grafana/provisioning/datasources/frequent_crawl.yaml +monitor/grafana/provisioning/datasources/prometheus.yaml +monitor/grafana/provisioning/datasources/domain_crawl.yaml +monitor/prometheus/prometheus.yml -monitor/grafana/provisioning/dashboards/daily_dashboard.json monitor/grafana/provisioning/dashboards/wa_status.json - -# h3exporter -h3exporter/h3exporter.pid.lock diff --git a/monitor/beta/start_monitor.sh b/monitor/beta/start_monitor.sh index ad1c77b..cddb38c 100755 --- a/monitor/beta/start_monitor.sh +++ b/monitor/beta/start_monitor.sh @@ -4,6 +4,7 @@ export PROMETHEUS_SERVICE_NAME='monitor-prometheus.bapi.wa.bl.uk' export ALERTMANAGER_SERVICE_NAME='monitor-alerts.bapi.wa.bl.uk' export GRAFANA_SERVICE_NAME='monitor-grafana.bapi.wa.bl.uk' export FC_EMBEDDED_SERVICE_NAME='192.168.45.34:9191' +export DC_EMBEDDED_SERVICE_NAME='192.168.45.21:9191' export VISUALIZER_PORT=8080 export GRAFANA_PORT=3000 diff --git a/monitor/dev/start_monitor.sh b/monitor/dev/start_monitor.sh index 22c4675..9a5eeef 100755 --- a/monitor/dev/start_monitor.sh +++ b/monitor/dev/start_monitor.sh @@ -4,6 +4,7 @@ export PROMETHEUS_SERVICE_NAME='monitor-prometheus.dapi.wa.bl.uk' export ALERTMANAGER_SERVICE_NAME='monitor-alerts.dapi.wa.bl.uk' export GRAFANA_SERVICE_NAME='monitor-grafana.dapi.wa.bl.uk' export FC_EMBEDDED_SERVICE_NAME='192.168.45.34:9191' +export DC_EMBEDDED_SERVICE_NAME='192.168.45.21:9191' export VISUALIZER_PORT=8082 export GRAFANA_PORT=3000 @@ -27,6 +28,7 @@ envsubst < ./alertmanager/config.yml-template > ./alertmanager/config.yml envsubst < ./grafana/grafana.ini-template > ./grafana/grafana.ini envsubst < ./grafana/provisioning/datasources/prometheus.yaml-template > ./grafana/provisioning/datasources/prometheus.yaml envsubst < ./grafana/provisioning/datasources/frequent_crawl.yaml-template > ./grafana/provisioning/datasources/frequent_crawl.yaml +envsubst < ./grafana/provisioning/datasources/domain_crawl.yaml-template > ./grafana/provisioning/datasources/domain_crawl.yaml envsubst < ./prometheus/prometheus.yml-template > ./prometheus/prometheus.yml envsubst < ./grafana/provisioning/dashboards/wa_status.json-template > ./grafana/provisioning/dashboards/wa_status.json diff --git a/monitor/grafana/provisioning/dashboards/dc_dashboard.json b/monitor/grafana/provisioning/dashboards/dc_dashboard.json index 8faba69..c4cd239 100644 --- a/monitor/grafana/provisioning/dashboards/dc_dashboard.json +++ b/monitor/grafana/provisioning/dashboards/dc_dashboard.json @@ -745,7 +745,7 @@ "steppedLine": false, "targets": [ { - "expr": "heritrix3_crawl_job_alerts_count{jobname=\"dc2020\"}", + "expr": "heritrix3_crawl_job_alerts_count{jobname='dc2023'}", "interval": "", "legendFormat": "{{jobname}}", "refId": "A" diff --git a/monitor/grafana/provisioning/datasources/domain_crawl.yaml-template b/monitor/grafana/provisioning/datasources/domain_crawl.yaml-template new file mode 100644 index 0000000..f741dac --- /dev/null +++ b/monitor/grafana/provisioning/datasources/domain_crawl.yaml-template @@ -0,0 +1,13 @@ +# Instances of grafana will only update datasource configurations +# for apiVersion numbers of same or lower. Thus, a new lower number +# will not affect higher number configuration settings. +# Typically BLUKWA keep this set to 1 +apiVersion: 1 + +datasources: + - name: 'Domain Crawler Embedded Prometheus' + type: prometheus + access: proxy + orgId: 1 + url: http://${DC_EMBEDDED_SERVICE_NAME} + isDefault: false diff --git a/monitor/prod/start_monitor.sh b/monitor/prod/start_monitor.sh index 9ca0652..a66e7c2 100755 --- a/monitor/prod/start_monitor.sh +++ b/monitor/prod/start_monitor.sh @@ -4,6 +4,7 @@ export PROMETHEUS_SERVICE_NAME='monitor-prometheus.api.wa.bl.uk' export ALERTMANAGER_SERVICE_NAME='monitor-alerts.api.wa.bl.uk' export GRAFANA_SERVICE_NAME='monitor-grafana.api.wa.bl.uk' export FC_EMBEDDED_SERVICE_NAME='192.168.45.34:9191' +export DC_EMBEDDED_SERVICE_NAME='192.168.45.21:9191' export VISUALIZER_PORT=8080 export GRAFANA_PORT=3000