Skip to content

Commit 2557117

Browse files
authored
respect the minimum interval in gauge graphs (#1048)
1 parent df34ed6 commit 2557117

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

dashboards/network-usage/namespace-by-pod.libsonnet

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ local var = g.dashboard.variable;
100100
value: 7000000000, // 7GBs
101101
},
102102
])
103+
+ gauge.queryOptions.withInterval($._config.grafanaK8s.minimumTimeInterval)
103104
+ gauge.queryOptions.withTargets([
104105
prometheus.new(
105106
'${datasource}', |||
@@ -121,6 +122,7 @@ local var = g.dashboard.variable;
121122
+ gauge.standardOptions.withUnit('Bps')
122123
+ gauge.standardOptions.withMin(0)
123124
+ gauge.standardOptions.withMax(10000000000) // 10GBs
125+
+ gauge.queryOptions.withInterval($._config.grafanaK8s.minimumTimeInterval)
124126
+ gauge.standardOptions.thresholds.withSteps([
125127
{
126128
color: 'dark-green',

dashboards/network-usage/namespace-by-workload.libsonnet

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ local var = g.dashboard.variable;
150150
+ barGauge.standardOptions.withUnit('Bps')
151151
+ barGauge.standardOptions.color.withMode('fixed')
152152
+ barGauge.standardOptions.color.withFixedColor('green')
153+
+ barGauge.queryOptions.withInterval($._config.grafanaK8s.minimumTimeInterval)
153154
+ barGauge.queryOptions.withTargets([
154155
prometheus.new(
155156
'${datasource}',
@@ -173,6 +174,7 @@ local var = g.dashboard.variable;
173174
+ barGauge.standardOptions.withUnit('Bps')
174175
+ barGauge.standardOptions.color.withMode('fixed')
175176
+ barGauge.standardOptions.color.withFixedColor('green')
177+
+ barGauge.queryOptions.withInterval($._config.grafanaK8s.minimumTimeInterval)
176178
+ barGauge.queryOptions.withTargets([
177179
prometheus.new(
178180
'${datasource}',

dashboards/network-usage/pod-total.libsonnet

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ local var = g.dashboard.variable;
101101
value: 7000000000, // 7GBs
102102
},
103103
])
104+
+ gauge.queryOptions.withInterval($._config.grafanaK8s.minimumTimeInterval)
104105
+ gauge.queryOptions.withTargets([
105106
prometheus.new(
106107
'${datasource}',
@@ -131,6 +132,7 @@ local var = g.dashboard.variable;
131132
value: 7000000000, // 7GBs
132133
},
133134
])
135+
+ gauge.queryOptions.withInterval($._config.grafanaK8s.minimumTimeInterval)
134136
+ gauge.queryOptions.withTargets([
135137
prometheus.new(
136138
'${datasource}',

dashboards/network-usage/workload-total.libsonnet

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ local var = g.dashboard.variable;
100100
+ barGauge.standardOptions.withUnit('Bps')
101101
+ barGauge.standardOptions.color.withMode('fixed')
102102
+ barGauge.standardOptions.color.withFixedColor('green')
103+
+ barGauge.queryOptions.withInterval($._config.grafanaK8s.minimumTimeInterval)
103104
+ barGauge.queryOptions.withTargets([
104105
prometheus.new(
105106
'${datasource}',
@@ -118,6 +119,7 @@ local var = g.dashboard.variable;
118119
+ barGauge.standardOptions.withUnit('Bps')
119120
+ barGauge.standardOptions.color.withMode('fixed')
120121
+ barGauge.standardOptions.color.withFixedColor('green')
122+
+ barGauge.queryOptions.withInterval($._config.grafanaK8s.minimumTimeInterval)
121123
+ barGauge.queryOptions.withTargets([
122124
prometheus.new(
123125
'${datasource}',
@@ -136,6 +138,7 @@ local var = g.dashboard.variable;
136138
+ barGauge.standardOptions.withUnit('Bps')
137139
+ barGauge.standardOptions.color.withMode('fixed')
138140
+ barGauge.standardOptions.color.withFixedColor('green')
141+
+ barGauge.queryOptions.withInterval($._config.grafanaK8s.minimumTimeInterval)
139142
+ barGauge.queryOptions.withTargets([
140143
prometheus.new(
141144
'${datasource}',
@@ -154,6 +157,7 @@ local var = g.dashboard.variable;
154157
+ barGauge.standardOptions.withUnit('Bps')
155158
+ barGauge.standardOptions.color.withMode('fixed')
156159
+ barGauge.standardOptions.color.withFixedColor('green')
160+
+ barGauge.queryOptions.withInterval($._config.grafanaK8s.minimumTimeInterval)
157161
+ barGauge.queryOptions.withTargets([
158162
prometheus.new(
159163
'${datasource}',

0 commit comments

Comments
 (0)