By Decai Xu
wget https://github.com/feiyu563/PrometheusAlert/releases/download/v4.8.1/linux.zip && unzip linux.zip && cd linux/
sed -i '/^open-tg=/c\open-tg=1' /root/linux/conf/app.conf # open telegram channel
sed -i '/^TG_TOKEN=/c\TG_TOKEN=xxxxxx' /root/linux/conf/app.conf # replaced by your telegram bot token
sed -i '/^TG_MODE_CHAN=/c\TG_MODE_CHAN=1' /root/linux/conf/app.conf # send alert to group or channel
sed -i '/^TG_USERID=/c\TG_USERID=xxxx' /root/linux/conf/app.conf # replaced by your telegram user id
sed -i '/^TG_CHANNAME/c\TG_CHANNAME=xxxx' /root/linux/conf/app.conf # replaced by your telegram group or channel id
You can call the getUpdates API to obtain TG_TOKEN, TG_USERID, and TG_CHANNAME.
https://api.telegram.org/bot<token>/getUpdates
nohup ./PrometheusAlert &
Template content:
Alibaba Cloud {{.AlertState}}INFO
>**{{.AlertName}}**
>ALERT LEVEL: {{.TriggerLevel}}
START TIME: {{GetTime .Timestamp}}
HOST: {{.InstanceName}}
------------DETAILS--------------
metricName: {{.MetricName}}
expression: {{.Expression}}
signature: {{.Signature}}
metricProject: {{.MetricProject}}
userId: {{.UserId}}
namespace: {{.Namespace}}
preTriggerLevel: {{.PreTriggerLevel}}
ruleId: {{.RuleId}}
dimensions: {{.Dimensions}}
**CURRENT VALUE:{{.CurValue}}**
A alert test message is received.
Technical Secrets of PolarDB: Cost Optimization - Hardware and Software Collaboration
JDP - July 2, 2021
Alibaba Cloud Community - July 15, 2022
Alibaba Cloud Community - December 13, 2022
Alibaba Cloud Community - March 31, 2022
Alibaba Cloud Community - August 12, 2024
Alibaba Clouder - November 25, 2019
A secure, reliable, and elastically scalable cloud database service for automatic monitoring, backup, and recovery by time point
Learn MoreApsaraDB for HBase is a NoSQL database engine that is highly optimized and 100% compatible with the community edition of HBase.
Learn MoreA financial-grade distributed relational database that features high stability, high scalability, and high performance.
Learn MoreA database engine fully compatible with Apache Cassandra with enterprise-level SLA assurance.
Learn MoreMore Posts by ApsaraDB