mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-20 03:29:05 +02:00
22 lines
790 B
Jsonnet
22 lines
790 B
Jsonnet
{
|
|
local c = self._config,
|
|
local a = (import '../lib/alerts.libsonnet')(c),
|
|
prometheusAlerts+:: {
|
|
groups+: a.group('windows-update', collectors=['update'], rules=[
|
|
{
|
|
alert: 'WindowsUpdatesPending',
|
|
expr: |||
|
|
count without (id, revision, category, severity, title) (windows_update_pending_info{%(windowsExporterSelector)s, deployment_action="installation"}) > 0
|
|
||| % c,
|
|
'for': c.updatePendingDuration,
|
|
labels: { severity: c.infoSeverity },
|
|
annotations: {
|
|
summary: 'Windows updates are waiting for installation',
|
|
description: '{{ $labels.instance }} has had {{ $value }} updates waiting for installation for %(updatePendingDuration)s.' % c,
|
|
},
|
|
state:: true,
|
|
},
|
|
]),
|
|
},
|
|
}
|