当前位置:网站首页>Alertmanager alarm configuration
Alertmanager alarm configuration
2022-06-12 02:24:00 【oneslide】
This example USES node_exporter The index item memory occupancy of is taken as an example , Record alertmanager How to configure Memory usage > 10% Alarm to Tencent corporate email .
docker-compose
version: '3.2'
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- 9090:9090
command:
- --config.file=/etc/prometheus/prometheus.yml
volumes:
- ./prom/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./prom/rule.yml:/etc/prometheus/rule.yml
grafana:
image: grafana/grafana-enterprise
ports:
- 3000:3000
node_exporter:
image: prom/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
network_mode: host
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
alertmanager:
image: prom/alertmanager
volumes:
- ./alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml
ports:
- 9093:9093
prometheus To configure
- prom/prometheus.yaml
# Configuration file of alarm rules
rule_files:
- /etc/prometheus/rule.yml
# altermanager Service address of
alerting:
alertmanagers:
- static_configs:
- targets:
- alertmanager:9093
- prom/rule.yml
groups:
- name: example
rules:
- alert: high_memory
# When the memory occupancy exceeds 10%, continued 1min, The alarm is triggered
expr: 100 - ((node_memory_MemAvailable_bytes{
instance="192.168.10.64:9100",job="node_exporter"} * 100) / node_memory_MemTotal_bytes{
instance="192.168.10.64:9100",job="node_exporter"}) > 90
for: 1m
labels:
severity: page
annotations:
summary: spike memeory
alertmanager To configure
- alertmanager/alertmanager.yml
How to configure the password of Tencent enterprise mailbox , My article has a record - Jenkins send out email To Tencent corporate email Pipeline The way
global:
# smtp Server address
smtp_smarthost: smtp.exmail.qq.com:465
# Sender email
smtp_from: <your_email>
# Sender email
smtp_auth_username: <your_email>
# Sender password
smtp_auth_password: <your_password>
smtp_require_tls: false
route:
group_by: ['alertname']
group_wait: 30s
group_interval: 5m
repeat_interval: 1h
receiver: 'mail'
receivers:
- name: 'mail'
email_configs:
# Recipient email
- to: '<your_email>'
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['alertname', 'dev', 'instance']
边栏推荐
- 力扣解法汇总699-掉落的方块
- Graphical data analysis | business analysis and data mining
- Don't miss it! Five large data visualization screens that HR must collect
- 力扣解法汇总905-按奇偶排序数组
- The most comprehensive redis transaction control in 2022 (with illustration)
- maya前台渲染插件mel脚本工具
- 力扣解法汇总388-文件的最长绝对路径
- Red's deleted number
- 力扣解法汇总942-增减字符串匹配
- 代理与反射(二)
猜你喜欢

Graphical data analysis | data analysis tool map

MySQL advanced knowledge points

(9) Serial port interrupt

超图倾斜数据合并根节点后转3dtiles

程序员应该如何解决买菜难问题?手把手带你利用无障碍辅助功能快速下单抢菜

博创智能冲刺科创板:年营收11亿 应收账款账面价值3亿

BaseDexClassLoader那些事

Master of a famous school has been working hard for 5 years. AI has no paper. How can the tutor free range?

El upload upload file

消防栓监测系统毕业设计---论文(附加最全面的从硬件电路设计->驱动程序设计->阿里云物联网搭建->安卓APP设计)
随机推荐
力扣解法汇总699-掉落的方块
adb命令 利用jks文件给apk签名
(9) Serial port interrupt
【无标题】2022煤矿安全检查考题及在线模拟考试
Force deduction solution summary 398 random number index
力扣解法汇总449-序列化和反序列化二叉搜索树
Maya Front Office Rendering plug - in Mel script Tool
力扣解法汇总417-太平洋大西洋水流问题
2022 Fujian Provincial Safety Officer C certificate (full-time safety officer) examination simulation 100 questions and answers
Implementation scheme of iteration and combination pattern for general tree structure
Xcall cluster script (view JPS command)
力扣解法汇总-剑指 Offer II 114. 外星文字典
BaseDexClassLoader那些事
What insurance products can you buy at the age of 60?
2022西式面点师(技师)复训题库及在线模拟考试
代理与反射(二)
Force deduction solution summary 358 Mini parser
力扣解法汇总386-字典序排数
ACL 2022 | 预训练语言模型和图文模型的强强联合
博创智能冲刺科创板:年营收11亿 应收账款账面价值3亿