From d41ac281a48608750b1e05b773de3534d7895c46 Mon Sep 17 00:00:00 2001 From: Timur Saikaliev Date: Sat, 5 Apr 2025 14:34:29 +0300 Subject: [PATCH] fix: rename windows_system_system_up_time metric --- dashboards/windows.libsonnet | 2 +- rules/windows.libsonnet | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboards/windows.libsonnet b/dashboards/windows.libsonnet index 5a3c0f380..21e29dc04 100644 --- a/dashboards/windows.libsonnet +++ b/dashboards/windows.libsonnet @@ -68,7 +68,7 @@ local var = g.dashboard.variable; + var.query.withDatasourceFromVariable(self.datasource) + var.query.queryTypes.withLabelValues( 'instance', - 'windows_system_system_up_time{%(clusterLabel)s="$cluster"}' % $._config + 'windows_system_boot_time_timestamp_seconds{%(clusterLabel)s="$cluster"}' % $._config ) + var.query.generalOptions.withLabel('instance') + var.query.refresh.onTime() diff --git a/rules/windows.libsonnet b/rules/windows.libsonnet index 3e1d4ba8a..c46f0304c 100644 --- a/rules/windows.libsonnet +++ b/rules/windows.libsonnet @@ -9,7 +9,7 @@ record: 'node:windows_node:sum', expr: ||| count by (%(clusterLabel)s) ( - windows_system_system_up_time{%(windowsExporterSelector)s} + windows_system_boot_time_timestamp_seconds{%(windowsExporterSelector)s} ) ||| % $._config, },