当前位置:网站首页>Prometheus alarm record persistence (historical alarm saving and Statistics)
Prometheus alarm record persistence (historical alarm saving and Statistics)
2022-04-23 07:05:00 【A sunny afternoon】
I came across a need some time ago : take Prometheus Persistent storage of historical alarms , Analyze and count again . After trying some tools , And finally alertsnitch+grafana The plan .
alertsnitch: https://gitlab.com/yakshaving.art/alertsnitch
Briefly introduce the principle of this tool ,alertsnitch Implemented a webhook, By means of alertmanager Middle configuration receiver by alertsbnitch webhook Send the alarm to alertsnitch,alertsnitch The data is processed and stored in Mysql/Postgre, For detailed introduction, please refer to its gitlab Home page .
Here is a brief introduction to how to use (k8s install , Database usage Mysql)
1、Mysql establish alertsnitch Database used and corresponding account , A little .
2、 install alertsnitch, Modify the following ALERTSNITCH_DSN Value
# alertsnitch-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: alertsnitch
namespace: alertmanager
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: alertsnitch
template:
metadata:
labels:
app.kubernetes.io/name: alertsnitch
spec:
containers:
- image: registry.gitlab.com/yakshaving.art/alertsnitch
name: alertsnitch
ports:
- containerPort: 9567
name: http
env:
- name: ALERTSNITCH_BACKEND
value: mysql
- name: ALERTSNITCH_DSN
value: ${MYSQL_USER}:${MYSQL_PASSWORD}(${MYSQL_IP}:${MYSQL_PORT})/{$MYSQL_DATABASE}
readinessProbe:
httpGet:
path: /-/ready
port: 9567
initialDelaySeconds: 30
periodSeconds: 10
livenessProbe:
httpGet:
path: /-/health
port: 9567
initialDelaySeconds: 60
periodSeconds: 10
apiVersion: v1
kind: Service
metadata:
name: alertsnitch
namespace: alertmanager
spec:
ports:
- name: http
port: 9567
targetPort: http
selector:
app.kubernetes.io/name: alertsnitch
3、 To configure alertmanager
route:
receiver: all
routes:
# All alarm collection
- receiver: all
continue: true
--------------------
receivers:
#alertsnitch
- name: 'all'
webhook_configs:
- url: 'http://alertsnitch.alertmanager.svc:9567/webhook'
send_resolved: true
4、 have access to grafana To display and count historical alarms , Make a ready-made for reference
版权声明
本文为[A sunny afternoon]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230600558319.html
边栏推荐
- Prometheus cortex Architecture Overview (horizontally scalable, highly available, multi tenant, long-term storage)
- MySQL【ACID+隔离级别+ redo log + undo log】
- JS regular matching first assertion and last assertion
- 用Future与CountDownLatch实现多线程执行多个异步任务,任务全部完成后返回结果
- openvswitch 编译安装
- ansible模块之include_tasks:为什么加了tags后导入的任务没有执行?
- How to use DBA_ hist_ active_ sess_ History analysis database history performance problems
- Using Prom label proxy to implement label based multi tenant reading of Prometheus thanos
- 实践使用PolarDB和ECS搭建门户网站
- bcc安装和基本工具使用说明
猜你喜欢

Thanos Compact组件测试总结(处理历史数据)

DDOS攻击/防御介绍

LeetCode刷题|38外观数组

Imitation scallop essay reading page

Thanos Compactor组件使用

Introduction to RDMA network

Memcached source code analysis

实践使用PolarDB和ECS搭建门户网站

LeetCode刷题|897递增顺序搜索树

Winter combat camp hands-on combat - first understand the cloud foundation, hands-on practice ECS ECS ECS novice on the road to get the mouse cloud Xiaobao backpack shadowless
随机推荐
Redis FAQ
How to use DBA_ hist_ active_ sess_ History analysis database history performance problems
Introduction to common APIs for EBFP programming
Oracle数据库性能分析之常用视图
Thanos Compact组件测试总结(处理历史数据)
XDP类型的BPF程序
Build a cloud blog based on ECS (send blessings on the cloud Xiaobao code and draw iphone13 for free)
使用prom-label-proxy实现Prometheus Thanos的基于标签的多租户读
Construire un blog Cloud basé sur ECS (bénédiction sur le Code Cloud Xiaobao, explication détaillée de la tâche iphone13 gratuite)
Ali vector library Icon tutorial (online, download)
[ES6 quick start]
[fish in the net] ansible awx calls playbook to transfer parameters
基於ECS搭建雲上博客(雲小寶碼上送祝福,免費抽iphone13任務詳解)
JS implementation of web page rotation map
BPF program of type XDP
冬季实战营动手实战-上云必备环境准备,动手实操快速搭建LAMP环境 领鼠标 云小宝 背包 无影
【不积跬步无以至千里】Oracle应用导数Ora-01455报错处理
MySQL【ACID+隔离级别+ redo log + undo log】
[Lombok quick start]
MySQL 【读写锁+表锁+行锁+MVCC】