mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-25 04:59:05 +01:00
dashboard: factor Grafonnet builders into tab modules (#2595)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
local b = import 'builders.libsonnet';
|
||||
local annotation = b.dashboard.spec.annotations;
|
||||
|
||||
[
|
||||
annotation.withKind()
|
||||
+ annotation.spec.withBuiltIn(true)
|
||||
+ annotation.spec.withEnable(true)
|
||||
+ annotation.spec.withHide(true)
|
||||
+ annotation.spec.withIconColor('rgba(0, 211, 255, 1)')
|
||||
+ annotation.spec.withLegacyOptions({
|
||||
type: 'dashboard',
|
||||
})
|
||||
+ annotation.spec.withName('Annotations & Alerts')
|
||||
+ annotation.spec.withQuery(b.dataQuery({}, 'grafana', '-- Grafana --'))
|
||||
,
|
||||
annotation.withKind()
|
||||
+ annotation.spec.withEnable(true)
|
||||
+ annotation.spec.withHide(false)
|
||||
+ annotation.spec.withIconColor('orange')
|
||||
+ annotation.spec.withLegacyOptions({
|
||||
expr: 'windows_system_boot_time_timestamp{job=~"$job", instance="$instance"} * 1000 > $__from < $__to',
|
||||
step: '1m',
|
||||
tagKeys: 'instance',
|
||||
textFormat: '',
|
||||
titleFormat: 'Reboot',
|
||||
useValueForTime: 'on',
|
||||
})
|
||||
+ annotation.spec.withName('Reboots')
|
||||
+ annotation.spec.withQuery(b.dataQuery({}, 'prometheus', '${datasource}')),
|
||||
]
|
||||
Reference in New Issue
Block a user