Skip to content
This repository has been archived by the owner on Jul 23, 2018. It is now read-only.

Commit

Permalink
Add some alert rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rverchere committed Sep 10, 2017
1 parent ccda381 commit 50ae0c6
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions alerts/vmware.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
ALERT VMWarnMemoryUsage
IF
((vmware_vm_mem_usage_average / 100) >= 90) and ((vmware_vm_mem_usage_average / 100) < 95)
FOR 30m
LABELS { severity = "warning" }
ANNOTATIONS {
title = "High memory usage on {{ $labels.instance }}: {{ $value | printf \"%.2f\" }}%",
}

ALERT VMCritMemoryUsage
IF
((vmware_vm_mem_usage_average / 100) >= 95)
FOR 5m
LABELS { severity = "critical" }
ANNOTATIONS {
title = "Very High memory usage on {{ $labels.instance }}: {{ $value | printf \"%.2f\" }}%",
}

ALERT VMWarnNumberSnapshots
IF
(vmware_vm_snapshots < 3)
FOR 30m
LABELS { severity = "warning" }
ANNOTATIONS {
title = "High snapshots number on {{ $labels.instance }}: {{ $value }}",
}

ALERT VMCritNumberSnapshots
IF
(vmware_vm_snapshots >= 3)
FOR 30m
LABELS { severity = "critical" }
ANNOTATIONS {
title = "Very high snapshot number on {{ $labels.instance }}: {{ $value }}",
}

ALERT VMWarnAgeSnapshots
IF
((time() - vmware_vm_snapshot_timestamp_seconds) / (60*60*24) >= 7)
FOR 5m
LABELS { severity = "warning" }
ANNOTATIONS {
title = "Outdated snapshot on {{ $labels.instance }}: {{ $value | printf \"%.0f\" }} days",
}

0 comments on commit 50ae0c6

Please sign in to comment.