-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add alertmanager to report alerts based on metricly metrics
- Loading branch information
Showing
9 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
global: | ||
resolve_timeout: 5m | ||
|
||
route: | ||
receiver: 'default' | ||
|
||
receivers: | ||
- name: 'default' | ||
email_configs: | ||
- to: '[email protected]' | ||
from: '[email protected]' | ||
smarthost: 'smtp.gmail.com:587' | ||
auth_username: '[email protected]' | ||
auth_identity: '[email protected]' | ||
auth_password: 'jqhotwxphmieuaqw' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
global: | ||
resolve_timeout: 5m | ||
|
||
route: | ||
receiver: 'default' | ||
|
||
receivers: | ||
- name: 'default' | ||
email_configs: | ||
- to: '[email protected]' # receiver's address | ||
from: '[email protected]' | ||
smarthost: 'smtp.gmail.com:587' | ||
auth_username: '[email protected]' # sender's address | ||
auth_identity: '[email protected]' # sender's address | ||
auth_password: 'xxxxxxxxxxxxx' # gmail app password generated by sender |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
groups: | ||
- name: cpu_alerts | ||
rules: | ||
- alert: CPUUsage > 60% | ||
expr: avg_over_time(metricly_cpu_total[5m]) > 60 | ||
for: 1m | ||
labels: | ||
severity: warning | ||
annotations: | ||
summary: "High CPU usage detected" | ||
description: "CPU usage is above 60% for the last 5 minutes on host {{ $labels.host }}" | ||
|
||
- alert: CPUUsage > 80% | ||
expr: avg_over_time(metricly_cpu_total[15m]) > 80 | ||
for: 1m | ||
labels: | ||
severity: critical | ||
annotations: | ||
summary: "High CPU usage detected" | ||
description: "CPU usage is above 80% for the last 15 minutes on host {{ $labels.host }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
groups: | ||
- name: disk_alerts | ||
rules: | ||
- alert: Disk Usage > 60% | ||
expr: 100*metricly_disk_used_bytes/metricly_disk_total_bytes > 60 | ||
for: 1m | ||
labels: | ||
severity: warning | ||
annotations: | ||
summary: "High Disk usage detected" | ||
description: "Disk usage is above 60%" | ||
|
||
- alert: Disk Usage > 80% | ||
expr: 100*metricly_disk_used_bytes/metricly_disk_total_bytes > 80 | ||
for: 1m | ||
labels: | ||
severity: critical | ||
annotations: | ||
summary: "High Disk usage detected" | ||
description: "Disk usage is above 80%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
groups: | ||
- name: memory_alerts | ||
rules: | ||
- alert: Memory Usage > 60% | ||
expr: 100*(metricly_memory_total_bytes-metricly_memory_available_bytes)/metricly_memory_total_bytes > 60 | ||
for: 1m | ||
labels: | ||
severity: warning | ||
annotations: | ||
summary: "High Memory usage detected" | ||
description: "Memory usage is above 60%" | ||
|
||
- alert: Memory Usage > 80% | ||
expr: 100*(metricly_memory_total_bytes-metricly_memory_available_bytes)/metricly_memory_total_bytes > 80 | ||
for: 1m | ||
labels: | ||
severity: critical | ||
annotations: | ||
summary: "High Memory usage detected" | ||
description: "Memory usage is above 80%" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters