Specify YAML formatting to all rules config.

This commit is contained in:
Pei-Tang Huang 2019-10-30 16:08:03 +08:00
parent 92d0a1d8f0
commit fa12d1476f
4 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ sum by (mode) (irate(wmi_cpu_time_total{instance="localhost"}[5m]))
## Alerting examples ## Alerting examples
**prometheus.rules** **prometheus.rules**
``` ```yaml
# Alert on hosts with more than 80% CPU usage over a 10 minute period # Alert on hosts with more than 80% CPU usage over a 10 minute period
- alert: CpuUsage - alert: CpuUsage
expr: 100 - (avg by (instance) (irate(wmi_cpu_time_total{mode="idle"}[2m])) * 100) > 80 expr: 100 - (avg by (instance) (irate(wmi_cpu_time_total{mode="idle"}[2m])) * 100) > 80

View File

@ -49,7 +49,7 @@ rate(wmi_logical_disk_reads_total{instance="localhost", volume="C:"}[2m]) + rate
## Alerting examples ## Alerting examples
**prometheus.rules** **prometheus.rules**
``` ```yaml
groups: groups:
- name: Windows Disk Alerts - name: Windows Disk Alerts
rules: rules:

View File

@ -43,7 +43,7 @@ wmi_os_timezone{timezone != "UTC"}
## Alerting examples ## Alerting examples
**prometheus.rules** **prometheus.rules**
``` ```yaml
# Alert on hosts that have exhausted all available physical memory # Alert on hosts that have exhausted all available physical memory
- alert: MemoryExhausted - alert: MemoryExhausted
expr: wmi_os_physical_memory_free_bytes == 0 expr: wmi_os_physical_memory_free_bytes == 0

View File

@ -79,7 +79,7 @@ count(wmi_service_state{exported_name=~"(sqlserveragent|mssqlserver)",state="run
## Alerting examples ## Alerting examples
**prometheus.rules** **prometheus.rules**
``` ```yaml
groups: groups:
- name: Microsoft SQL Server Alerts - name: Microsoft SQL Server Alerts
rules: rules: