Prometheus altermanager email alert:
Download URL:
Https://prometheus.io/download
Tar zxfv alertmanager-0.15.2.linux-amd64.tar.gz-C/SPACE/MV/SPACE/alertmanager-0.15.2.linux-amd64/influxdb/alertmanagervi/SPACE/altermanager. yml
Global:
Resolve_timeout: 5 m
Smtp_smarthost: 'smtp .ming.com: 25'
Smtp_from: '[email protected]'
Route:
Group_by: ['low']
Group_wait: 10 s
Group_interval: 10 s
Repeat_interval: 1 h
Receiver: 'shprom'
Receivers:
- Name: 'shprom'
Email_configs:
: WQ
/SPACE/altermanager -- config. File =/SPACE/altermanager. ymlvi/SPACE/altermanager/down. yml
Groups:
- Name: Down
Rules:-Alert: instancedown
Expr: Up = 0
For: 30 s
Labels:
User: shprom
Annotations:
Summary "instance {$ labels. instance} Down"
Description: "{$ labels. instance} of job {$ labels. Job} has been down for more than 1 minutes ."
: WQ
VI/SPACE/altermanager/MEM. yml
Groups:
- Name: Mem
Rules:
- Alert: nodememoryusage
Expr: 100-(sum (node_memory_cached_bytes) + sum (node_memory_buffers_bytes) + sum (node_memory_memfree_bytes)/sum (bytes) * 100)> 80
For: 1 m
Labels:
User: shprom
Annotations:
Summary: "{$ labels. instance} high memory usage detected"
Description: "{$ labels. instance }}: memory usage is abve 80% (current value is: {$ value }})"
: WQ
VI/SPACE/Prometheus. yml
Alerting:
Alertmanagers:
- Static_configs:
- Targets: ['localhost: 100']-alertmanager: 9093
Rule_files:
: WQ
/SPACE/Prometheus -- config. File =/SPACE/Prometheus. yml -- storage. tsdb. Path =/SPACE/Prometheus/Data
Prometheus altermanager email alert