From 2ae0d91ed31b5e67fbbe6737b310c76fa878e065 Mon Sep 17 00:00:00 2001 From: Vallari Agrawal Date: Fri, 21 Mar 2025 13:39:31 +0530 Subject: [PATCH] monitoring: add 'noValue' config to garfana panels Add noValue param to garfana panel functions: - timeSeriesPanel - addStatPanel Signed-off-by: Vallari Agrawal --- monitoring/ceph-mixin/dashboards/timeseries_panel.libsonnet | 2 ++ monitoring/ceph-mixin/dashboards/utils.libsonnet | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/monitoring/ceph-mixin/dashboards/timeseries_panel.libsonnet b/monitoring/ceph-mixin/dashboards/timeseries_panel.libsonnet index 6cd7e70a42eaf..10e7885f1ce18 100644 --- a/monitoring/ceph-mixin/dashboards/timeseries_panel.libsonnet +++ b/monitoring/ceph-mixin/dashboards/timeseries_panel.libsonnet @@ -43,6 +43,7 @@ scaleDistributionLog=null, sortBy=null, sortDesc=null, + noValue=null, ):: { title: title, type: 'timeseries', @@ -90,6 +91,7 @@ mode: thresholdsMode, steps: [], }, + [if noValue != null then 'noValue']: noValue, unit: unit, }, overrides: [], diff --git a/monitoring/ceph-mixin/dashboards/utils.libsonnet b/monitoring/ceph-mixin/dashboards/utils.libsonnet index 50fa0027f28e6..3e5d685b6860d 100644 --- a/monitoring/ceph-mixin/dashboards/utils.libsonnet +++ b/monitoring/ceph-mixin/dashboards/utils.libsonnet @@ -412,6 +412,7 @@ local timeSeries = import 'timeseries_panel.libsonnet'; isGrayOnNoData=null, isHideAlertsOnDisable=null, isIgnoreOKColors=null, + noValue=null, ):: g.statPanel.new( title=title, @@ -428,6 +429,7 @@ local timeSeries = import 'timeseries_panel.libsonnet'; pluginVersion=pluginVersion, decimals=decimals, thresholdsMode=thresholdsMode, + noValue=noValue ) + { [if interval != null then 'interval']: interval, [if maxDataPoints != null then 'maxDataPoints']: maxDataPoints, @@ -609,6 +611,7 @@ local timeSeries = import 'timeseries_panel.libsonnet'; scaleDistributionLog=null, sortBy=null, sortDesc=null, + noValue=null, ):: timeSeries.new( title=title, @@ -643,6 +646,7 @@ local timeSeries = import 'timeseries_panel.libsonnet'; scaleDistributionLog=scaleDistributionLog, sortBy=sortBy, sortDesc=sortDesc, + noValue=noValue, ) + { pluginVersion: pluginVersion, [if interval != null then 'interval']: interval, -- 2.39.5