Files
windows_exporter/contrib/mixin/dashboards/annotations.libsonnet
T
2026-10-09 10:36:45 +02:00

31 lines
1013 B
Jsonnet

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}')),
]