From be21f6fe10fb34dd98d9e1a32c95e45ffa92f4fa Mon Sep 17 00:00:00 2001 From: Al Cutter Date: Mon, 30 Sep 2024 13:58:30 +0100 Subject: [PATCH] Improve num_online graphs (#225) --- deployment/modules/monitoring/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/modules/monitoring/main.tf b/deployment/modules/monitoring/main.tf index 6113244..51a1725 100644 --- a/deployment/modules/monitoring/main.tf +++ b/deployment/modules/monitoring/main.tf @@ -92,7 +92,7 @@ resource "google_monitoring_dashboard" "witness_dashboard" { "xyChart": { "dataSets": [{ "timeSeriesQuery": { - "prometheusQuery": "count by (witness_id) (max by (instance_id, witness_id) (rate(distributor_update_checkpoint_request{configuration_name='distributor-service-${var.env}'}[$${__interval}]) > bool 0))" + "prometheusQuery": "max by (instance_id, witness_id) (rate(distributor_update_checkpoint_request{configuration_name='distributor-service-${var.env}'}[$${__interval}])) > bool 0" }, "plotType": "STACKED_AREA" }], @@ -111,7 +111,7 @@ resource "google_monitoring_dashboard" "witness_dashboard" { "xyChart": { "dataSets": [{ "timeSeriesQuery": { - "prometheusQuery": "count by (instance_id) (max by (instance_id, witness_id) (rate(distributor_update_checkpoint_request{configuration_name='distributor-service-${var.env}'}[$${__interval}]) > bool 0)) * 100 / ${var.num_expected_devices}" + "prometheusQuery": "sum (max by (instance_id, witness_id) (rate(distributor_update_checkpoint_request{configuration_name='distributor-service-${var.env}'}[$${__interval}])) > bool 0) * 100 / ${var.num_expected_devices}" }, "plotType": "STACKED_AREA" }],