【prometheus】alertmanager 配置文件示例
global:# The smarthost and SMTP sender used for mail notifications. 用于邮件通知的智能主机和SMTP发件人。smtp_smarthost: 'localhost:25'smtp_from: 'alertmanager@example.org'smtp_auth_username: 'alertmanager'smtp_auth_password: 'password'# The auth token for Hipchat. Hipchat的身份验证令牌。hipchat_auth_token: '1234556789'# Alternative host for Hipchat.hipchat_api_url: 'https://hipchat.foobar.org/'# The directory from which notification templates are read. 从中读取通知模板的目录。
templates:
- '/etc/alertmanager/template/*.tmpl'# The root route on which each incoming alert enters. 每个传入警报进入的根路由
route:# The labels by which incoming alerts are grouped together. For example,# multiple alerts coming in for cluster=A and alertname=LatencyHigh would# be batched into a single group.## To aggregate by all possible labels use '...' as the sole label name.# This effectively disables aggregation entirely, passing through all # alerts as-is. This is unlikely to be what you want, unless you have# a very low alert volume or your upstream notification system performs# its own grouping. Example: group_by: [...]# 传入警报分组在一起的标签。例如,群集= A和 alertname = LatencyHigh的多个警报将会出现被分成一组。# 要按所有可能的标签聚合,请使用“...”作为唯一的标签名称。# 这有效地完全禁用了聚合,按原样传递所有警报。这不太可能是您想要的,除非您的警报音量非常低或您的上游通知系统执行group_by: ['alertname', 'cluster', 'service']# When a new group of alerts is created by an incoming alert, wait at least 'group_wait' to send the initial notification.# 当传入警报创建新的警报组时,至少等待'group_wait'发送初始通知。# This way ensures that you get multiple alerts for the same group that start firing shortly # after another are batched together on the first notification.# 这种方式可确保您为同一组获得多个警报,这些警报会在第一个通知上另一个批处理后立即开始触发group_wait: 30s# When the first notification was sent, wait 'group_interval' to send a batch# of new alerts that started firing for that group.# 发送第一个通知时,请等待'group_interval'发送一批为该组开始触发的新警报。group_interval: 5m# If an alert has successfully been sent, wait 'repeat_interval' to resend them.# 如果已成功发送警报,请等待'repeat_interval'重新发送。repeat_interval: 3h # A default receiverreceiver: team-X-mails# All the above attributes are inherited by all child routes and can overwritten on each.# 所有上述属性都由所有子路由继承,并且可以在每个子路由上覆盖。# The child route trees.routes:# This routes performs a regular expression match on alert labels to catch alerts that are related to a list of services.# 此路由在警报标签上执行正则表达式匹配,以捕获与服务列表相关的警报。- match_re:service: ^(foo1|foo2|baz)$receiver: team-X-mails# The service has a sub-route for critical alerts, any alerts that do not match, i.e. severity != critical, fall-back to the parent node and are sent to 'team-X-mails'# 该服务具有关键警报的子路由,任何不匹配的警报,即严重性!=严重,回退到父节点并发送到routes:- match:severity: criticalreceiver: team-X-pager- match:service: filesreceiver: team-Y-mailsroutes:- match:severity: criticalreceiver: team-Y-pager# This route handles all alerts coming from a database service. If there's no team to handle it, it defaults to the DB team.# 此路由处理来自数据库服务的所有警报。如果没有团队可以处理它,则默认为数据库团队。- match:service: databasereceiver: team-DB-pager# Also group alerts by affected database.group_by: [alertname, cluster, database]routes:- match:owner: team-Xreceiver: team-X-pagercontinue: true- match:owner: team-Yreceiver: team-Y-pager# Inhibition rules allow to mute a set of alerts given that another alert is firing.
# 抑制规则允许在另一个警报触发时静音一组警报。
# We use this to mute any warning-level notifications if the same alert is already critical.
# 如果相同的警报已经很关键,我们使用它来静音任何警告级别的通知。
inhibit_rules:
- source_match:severity: 'critical'target_match:severity: 'warning'# Apply inhibition if the alertname is the same. 如果警报名称相同,则应用禁止。equal: ['alertname', 'cluster', 'service']receivers:
- name: 'team-X-mails'email_configs:- to: 'team-X+alerts@example.org'- name: 'team-X-pager'email_configs:- to: 'team-X+alerts-critical@example.org'pagerduty_configs:- service_key: <team-X-key>- name: 'team-Y-mails'email_configs:- to: 'team-Y+alerts@example.org'- name: 'team-Y-pager'pagerduty_configs:- service_key: <team-Y-key>- name: 'team-DB-pager'pagerduty_configs:- service_key: <team-DB-key>- name: 'team-X-hipchat'hipchat_configs:- auth_token: <auth_token>room_id: 85message_format: htmlnotify: true
原文链接:https://github.com/prometheus/alertmanager/blob/master/doc/examples/simple.yml
【prometheus】alertmanager 配置文件示例相关推荐
- Prometheus Alertmanager报警组件
全栈工程师开发手册 (作者:栾鹏) 架构系列文章 Prometheus Alertmanager 概述 Alertmanager与Prometheus是相互分离的两个组件.Prometheus服务器根 ...
- Prometheus AlertManager 微信报警配置
Prometheus AlertManager 微信报警配置 alertmanager支持email,webhook等报警源支持,看到可以支持微信报警信息推送觉得有意思把玩一下,alertmanage ...
- prometheus+alertmanager+webhook实现自定义监控报警系统
文章目录 1.概述 2.prometheus配置报警规则 3.alertmanager配置及部署 3.1.alertmanager配置 3.2.alertmanager部署 4.prometheus关 ...
- 基于k8s+Prometheus+Alertmanager+Grafana构建企业级监控告警系统
特别提醒: 下文实验需要的yaml文件和压缩包可加我微信获取 微信: luckylucky421302 1.1 深度解读Prometheus 1.1.1 什么是Prometheus? Prometh ...
- redis 配置文件示例
# redis 配置文件示例 # 当你需要为某个配置项指定内存大小的时候,必须要带上单位, # 通常的格式就是 1k 5gb 4m 等酱紫: # # 1k => 1000 bytes # 1 ...
- linux c语言 readline,Linux C代码实现读取配置文件示例
/** 读配置文件示例 注:配置文件必须为unix格式,即\n结尾 */ #include #include #include #include #include // 结构体 struct host ...
- Nginx配置文件示例
Nginx配置文件示例 nginx.conf load_module modules/ngx_http_image_filter_module.so;user root; worker_process ...
- Nginx反向代理与负载均衡等配置文件示例
Nginx反向代理于负载均衡等配置文件示例 Nginx.conf配置文件 worker_processes 8;events {worker_connections 1024; }http {incl ...
- Linux C代码实现读取配置文件示例
最近在看hostapd,该程序使用了conf配置文件,本文参考hostapd代码抽取出读取配置文件的示例,由于配置选项和业务密切相关,实际使用中仍需要做修改. 下面是代码示例: /** 读配置文件示例 ...
最新文章
- 认真对待学习(2月反思)
- Kong APIGW — Admin API 核心逻辑对象
- 华为企业管理经典案例_企业税务筹划-华为公司税筹案例分析
- MySQL服务的启动与停止-使用命令行工具
- 2019宁波最重视的行业
- Stringbuffer的线程安全是怎么实现的
- JavaScript总结摘要
- 张高兴的 Windows 10 IoT 开发笔记:BMP180 气压传感器
- Installshield如何实现升级覆盖文件
- 思路分享——hdu 3233
- c语言高亮字符,C语言语法高亮工具
- JDK下载、安装和环境配置
- 用友java开发待遇_【北京用友软件工资】java开发工程师待遇-看准网
- Java源码 SpringMVC Mybatis Shiro Bootstrap Rest Webservice
- Windows10正式版为什么没有休眠选项?
- 【避免进程死锁】银行家算法
- PPT制作 ---------插入图片背景颜色与模板的背景颜色不一致
- 系统突然访问变慢,如何排查和解决?
- CodeForces 868A Bark to Unlock
- 一二建成绩查询,就这个电话!
热门文章
- DL之DNN:自定义MultiLayerNet【6*100+ReLU,SGD】对MNIST数据集训练进而比较【多个超参数组合最优化】性能
- WeChat之小工具:基于C++程序代码设计的查看微信撤销、撤回消息(包括文本、图片、视频等)GUI小工具
- Crawler:基于splinter.browser库实现爬取12306网站来实现快速抢票
- ML之预测:玩转2018世界杯—采用机器学习预测小组赛、十六比赛、四决赛、半决赛、决赛以及世界杯总冠军的各个队伍
- Py之argparse:Python库之argparse(命令行解析)简介、安装、使用方法之详细攻略
- 盘点selenium phantomJS使用的坑
- mybatis入门(六)----高级映射(一对一,一对多,多对多)
- 2017-2018-1 20155330 《信息安全系统设计基础》第11周学习总结
- a, b = b, a+b
- Fckeditor插入视频或视频文件