mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
Specify YAML formatting to all rules config.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user