From fa12d1476f17c35450de8fc70083be6db03a52cc Mon Sep 17 00:00:00 2001 From: Pei-Tang Huang Date: Wed, 30 Oct 2019 16:08:03 +0800 Subject: [PATCH] Specify YAML formatting to all rules config. --- docs/collector.cpu.md | 2 +- docs/collector.logical_disk.md | 2 +- docs/collector.os.md | 2 +- docs/collector.service.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/collector.cpu.md b/docs/collector.cpu.md index b5cdeaf7..1871921b 100644 --- a/docs/collector.cpu.md +++ b/docs/collector.cpu.md @@ -47,7 +47,7 @@ sum by (mode) (irate(wmi_cpu_time_total{instance="localhost"}[5m])) ## Alerting examples **prometheus.rules** -``` +```yaml # Alert on hosts with more than 80% CPU usage over a 10 minute period - alert: CpuUsage expr: 100 - (avg by (instance) (irate(wmi_cpu_time_total{mode="idle"}[2m])) * 100) > 80 diff --git a/docs/collector.logical_disk.md b/docs/collector.logical_disk.md index 1b61d3d3..9345d1cd 100644 --- a/docs/collector.logical_disk.md +++ b/docs/collector.logical_disk.md @@ -49,7 +49,7 @@ rate(wmi_logical_disk_reads_total{instance="localhost", volume="C:"}[2m]) + rate ## Alerting examples **prometheus.rules** -``` +```yaml groups: - name: Windows Disk Alerts rules: diff --git a/docs/collector.os.md b/docs/collector.os.md index 29c525a3..b812cd12 100644 --- a/docs/collector.os.md +++ b/docs/collector.os.md @@ -43,7 +43,7 @@ wmi_os_timezone{timezone != "UTC"} ## Alerting examples **prometheus.rules** -``` +```yaml # Alert on hosts that have exhausted all available physical memory - alert: MemoryExhausted expr: wmi_os_physical_memory_free_bytes == 0 diff --git a/docs/collector.service.md b/docs/collector.service.md index 15aaa3ce..e12cb654 100644 --- a/docs/collector.service.md +++ b/docs/collector.service.md @@ -79,7 +79,7 @@ count(wmi_service_state{exported_name=~"(sqlserveragent|mssqlserver)",state="run ## Alerting examples **prometheus.rules** -``` +```yaml groups: - name: Microsoft SQL Server Alerts rules: