project-config/grafana/nodepool-dib.image.template
Ian Wienand c9529da49b grafana: fix nodepool-dib page
This must have had some issues later versions of grafana have
revealed.  Scale and use the last value for the "Last Build" field.
Fix a syntax issue with the build duration.

Change-Id: If0ece733a0acef9de059673848420155e4945718
2022-03-10 13:46:29 +11:00

54 lines
1.4 KiB
Plaintext

# AUTOGENERATED : %TITLE%
- title: %TITLE%
showTitle: true
height: 200px
panels:
- title: Build status
colorBackground: true
type: singlestat
valueName: current
valueMaps:
- value: 0
text: "OK"
- value: 1
text: "FAILED"
thresholds: 0.1,0.9
span: 2
targets:
- target: "stats.gauges.nodepool.dib_image_build.%KEY%.status.rc"
valueFontSize: "50%"
- title: Last build
type: singlestat
valueName: current
span: 2
format: dateTimeFromNow
targets:
- target: "scale(stats.gauges.nodepool.dib_image_build.%KEY%.status.last_build, 1000)"
valueFontSize: "50%"
- title: Image size
type: graph
span: 3
yaxes:
- format: decbytes
min: 0
- format: decbytes
min: 0
targets:
- target: aliasByNode(stats.gauges.nodepool.dib_image_build.%KEY%.*.size, 5)
refId: A
- title: Build duration
type: graph
span: 3
yaxes:
- format: ms
min: 0
- format: ms
min: 0
targets:
- target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.%KEY%.status.duration.mean), "Time")
refId: A