File tree Expand file tree Collapse file tree 3 files changed +67
-13
lines changed Expand file tree Collapse file tree 3 files changed +67
-13
lines changed Original file line number Diff line number Diff line change @@ -403,22 +403,23 @@ local nodeOOMKills =
403403 ]);
404404
405405local nonRunningPods =
406- common.barChartOptions
407- + barChart.new('Pods not in Running state' )
408- + barChart.panelOptions.withDescription(
406+ common.tsOptions
407+ + common.tsPodStateStylingOverrides
408+ + ts.new('Non Running Pods' )
409+ + ts.panelOptions.withDescription(
409410 |||
410- Pods in states other than 'Running' .
411+ Pods in a non-running state in the hub's namespace .
411412
412- In a functional clusters, pods should not be in non-Running states for long.
413- ||| ,
413+ Pods stuck in non-running states often indicate an error condition
414+ |||
414415 )
415- + ts.fieldConfig.defaults.custom.stacking.withMode('normal' )
416- + barChart.standardOptions.withDecimals(0 )
417- + barChart.queryOptions.withTargets([
416+ + ts.queryOptions.withTargets([
418417 prometheus.new(
419418 '$PROMETHEUS_DS' ,
420419 |||
421- sum(kube_pod_status_phase{phase!="Running"}) by (phase)
420+ sum(
421+ kube_pod_status_phase{phase!="Running"}
422+ ) by (phase)
422423 |||
423424 )
424425 + prometheus.withLegendFormat('{{phase}}' ),
Original file line number Diff line number Diff line change @@ -98,6 +98,61 @@ local _getDashedLineOverride(pattern, color) = {
9898 ])
9999 ,
100100
101+ tsPodStateStylingOverrides:
102+ ts.standardOptions.withOverrides([
103+ {
104+ matcher: { id: 'byName' , options: 'Pending' },
105+ properties: [{
106+ id: 'color' ,
107+ value: {
108+ fixedColor: 'yellow' ,
109+ mode: 'fixed' ,
110+ },
111+ }],
112+ },
113+ {
114+ matcher: { id: 'byName' , options: 'Running' },
115+ properties: [{
116+ id: 'color' ,
117+ value: {
118+ fixedColor: 'blue' ,
119+ mode: 'fixed' ,
120+ },
121+ }],
122+ },
123+ {
124+ matcher: { id: 'byName' , options: 'Succeeded' },
125+ properties: [{
126+ id: 'color' ,
127+ value: {
128+ fixedColor: 'green' ,
129+ mode: 'fixed' ,
130+ },
131+ }],
132+ },
133+ {
134+ matcher: { id: 'byName' , options: 'Unknown' },
135+ properties: [{
136+ id: 'color' ,
137+ value: {
138+ fixedColor: 'orange' ,
139+ mode: 'fixed' ,
140+ },
141+ }],
142+ },
143+ {
144+ matcher: { id: 'byName' , options: 'Failed' },
145+ properties: [{
146+ id: 'color' ,
147+ value: {
148+ fixedColor: 'red' ,
149+ mode: 'fixed' ,
150+ },
151+ }],
152+ },
153+ ])
154+ ,
155+
101156 // grafonnet ref: https://grafana.github.io/grafonnet/API/dashboard/variable.html
102157 variables: {
103158 prometheus:
Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ local usersPerNode =
230230
231231local nonRunningPods =
232232 common.tsOptions
233+ + common.tsPodStateStylingOverrides
233234 + ts.new('Non Running Pods' )
234235 + ts.panelOptions.withDescription(
235236 |||
@@ -238,8 +239,6 @@ local nonRunningPods =
238239 Pods stuck in non-running states often indicate an error condition
239240 |||
240241 )
241- // decimalsY1=0,
242- + ts.fieldConfig.defaults.custom.stacking.withMode('normal' )
243242 + ts.queryOptions.withTargets([
244243 prometheus.new(
245244 '$PROMETHEUS_DS' ,
@@ -265,7 +264,6 @@ local sharedVolumeFreeSpace =
265264 what extra deployment is needed.
266265 |||
267266 )
268- // decimalsY1=0,
269267 + ts.standardOptions.withMax(1 )
270268 + ts.standardOptions.withUnit('percentunit' )
271269 + ts.queryOptions.withTargets([
You can’t perform that action at this time.
0 commit comments