Prometheus+Altermanager钉钉报警
Prometheus+Altermanager钉钉报警
一、添加钉钉机器人
参考钉钉官方文档:https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq

二、在k8s上部署钉钉告警deployment,这里我们引用第三方的插件。
[root@cn-hongkong webhook-dingtalk]# cat webhook-dingtalk.yaml
apiVersion: apps/v1beta2
kind: Deployment
metadata:
labels:
app: webhook-dingtalk
name: webhook-dingtalk
namespace: monitoring
#需要和alertmanager在同一个namespace
spec:
replicas: 1
selector:
matchLabels:
app: webhook-dingtalk
template:
metadata:
labels:
app: webhook-dingtalk
spec:
containers:
- image: billy98/webhook-dingtalk:latest
name: webhook-dingtalk
args:
- "https://oapi.dingtalk.com/robot/send?access_token=1fd59067ab85bea575122a5e4f05cefd6609d9d3e41a725e46a90c2fad9b3"
#上面创建的钉钉机器人hook
ports:
- containerPort: 8080
protocol: TCP
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 500Mi
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
tcpSocket:
port: 8080
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
httpGet:
port: 8080
path: /
imagePullSecrets:
- name: IfNotPresent
---
apiVersion: v1
kind: Service
metadata:
labels:
app: webhook-dingtalk
name: webhook-dingtalk
namespace: monitoring
#需要和alertmanager在同一个namespace
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
app: webhook-dingtalk
type: ClusterIP
三、alertmanager添加钉钉告警类型
config:
global:
resolve_timeout: 5m
route:
group_by: ['job','severity']
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receiver: default
receiver: webhook
routes:
- match:
filesystem: node
receiver: webhook
receivers:
- name: webhook
webhook_configs:
- url: http://webhook-dingtalk/dingtalk/send/
send_resolved: true
四、查看告警信息

Prometheus+Altermanager钉钉报警的更多相关文章
- prometheus报警消息钉钉通知
设置prometheus 的web hook 为对应服务: 报警的配置如下,设置了web hook url,报警就会把消息发给web hookurl,但是这里的数据格式和钉钉要求的格式不一样,所以后面 ...
- docker-compose 快速部署Prometheus之服务端并监控ceph cluster 使用钉钉webhook 报警
现在环境是这样: ceph 4台: 192.168.100.21 ceph-node1 192.168.100.22 ceph-node2 192.168.100.23 ceph-node3 1 ...
- 使用 Prometheus Alertmanager 模块发送 Doris 异常信息至钉钉报警群
基础环境 1.Prometheus 版本:2.22.2 下载地址: https://github.com/prometheus/prometheus/releases/download/v2.22.2 ...
- 钉钉报警-prometheus-alertmanager
alertmanager alertmanager可以放在远程服务器上 报警机制 在 prometheus 中定义你的监控规则,即配置一个触发器,某个值超过了设置的阈值就触发告警, prometheu ...
- Docker系列——Grafana+Prometheus+Node-exporter钉钉推送(四)
近期搭建的服务器监控平台,来进行一个总结.主要分为监控平台的搭建.告警中心的配置以及消息的推送.推送的话,支持多种终端.具体详细可查看之前的博文,在这里罗列下,方便查看. Docker系列--Graf ...
- 远见而明察近观若明火|Centos7.6环境基于Prometheus和Grafana结合钉钉机器人打造全时监控(预警)Docker容器服务系统
原文转载自「刘悦的技术博客」https://v3u.cn/a_id_181 我们知道,奉行长期主义的网络公司,势必应在软件开发流程管理体系上具备规范意识,即代码提交有CR(CodeReview),功能 ...
- Grafana+Prometheus系统监控之钉钉报警功能
介绍 钉钉,阿里巴巴出品,专为中国企业打造的免费智能移动办公平台,含PC版,Web版和手机版.智能办公电话,消息已读未读,DING消息任务管理,让沟通更高效:移动办公考勤,签到,审批,企业邮箱,企业网 ...
- 钉钉机器人zabbix报警
首先在钉钉群聊里添加一个自定义的机器人 并复制webhook的内容 https://oapi.dingtalk.com/robot/send?access_token=37e23308d1b84eb4 ...
- elk报警监控之sentinl 钉钉+邮件告警
注:我的elk sentinl版本都是6.5.1 前期知识 es的查询语法.es watcher使用方法. https://www.cnblogs.com/pilihaotian/p/5830754. ...
随机推荐
- Apache Pig中文教程集合
Apache Pig中文教程集合: http://www.codelast.com/?p=4550#more-4550
- Vue中axios的封装和api接口的统一管理
更新的是我csdn上的文章,需要的话可以看下,互相学习点击去我的csdn vue中axios的封装 在vue项目和后端交互获取数据时,通常使用axios库,官方文档:https://www.npmjs ...
- 使用 App Inventor 2 开发简单的安卓小游戏
App Inventor2 是一个简单的在线开发安卓应用程序的工具,通过此工具,我们可以很轻松地开发安卓应用. 这里介绍的是笔者自己写的一个小游戏,游戏中玩家通过左右倾斜手机控制“水库”的左右移动,收 ...
- 百万年薪python之路 -- f-strings 格式化
f-strings 是python3.6开始加入标准库的格式化输出新的写法,这个格式化输出比之前的%s 或者 format 效率高并且更加简化,非常的好用. 2.1 简单举例 他的结构就是F(f)+ ...
- 自定义表头Datagrid
自定义的一个表头 <bp:BasePage x:Class="NetReform.Pages.RealProbabiTableCompare" xmlns="htt ...
- 仿写vue UI 组件总结 (自己练习,仿照现有的UI组件)
UI组件 Vue开发插件流程 本来是昨天要写总结的,感觉自己写不好,就放弃了.今天看到了iview和element有一些摩擦,是关于代码借鉴的问题(哈哈),不做评价.谁下生会写组件,我仿(chao)写 ...
- unity5.6.1 videoPlayer
unity5.6开始增加了videoPlayer,使得视频播放相对比较简单,项目需求进行了一下研究应用,也遇到很多坑,Google 百度一下发现确实有这些问题,一些简单问题如下: 1)播放无声音 2) ...
- 讲一讲快速学习WPF的思路
我不想浪费大家的时间,直接奔主题了. 首先大家要明白,WPF跟Winform的区别,优点,缺点. 首先入门来讲 Winform简单点,WPF会难一点.所以第一次接触C# 我推荐用Winform项目去学 ...
- 学习笔记之javascript编写简单计算器
感觉自己的的实力真的是有待提高,在编写计算器的过程中,出现了各种各样的问题,暴露了自己的基础不扎实,逻辑思维能力不够,学得知识不能运用到自己的demo中区.先介绍一些这个这个计算器的整体思路.大致 ...
- API gateway 之 kong 安装 (二)
一.系统环境 [root@kong ~]# service iptables status iptables: Firewall is not running. [root@kong ~]# gete ...