In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Prometheus configuration nail alarm get nail token configuration nail webhook
nailing provides a webhook interface through the robot, but the nailing robot has strict requirements on the file format, so it must be converted through a specific format before it can be sent to your nailing robot. Someone has already written the conversion plug-in, and I am a borrowlism (mainly because I can't do it myself, so let's run first), so just use it.
Command line mode
Install the go language wget-c https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gztar-C / usr/local/-zxvf go1.8.3.linux-amd64.tar.gz mkdir-p / home/gocodecat > / etc/profileexport GOROOT=/usr/local/go # set to the path of go installation export GOPATH=/home/gocode # the path of the default installation package export PATH=$PATH:$GOROOT/bin:$GOPATH/binEOFsource / etc/profile compilation pin Plug-in cd / home/gocode/mkdir-p src/github.com/timonwong/cd / home/gocode/src/github.com/timonwong/git clone https://github.com/timonwong/prometheus-webhook-dingtalk.gitmakeln-s / home/gocode/src/github.com/timonwong/prometheus-webhook-dingtalk/prometheus-webhook-dingtalk / usr/local/bin/prometheus-webhook-dingtalk launch plug-in nohup prometheus-webhook-dingtalk-- ding.profile= "webhook1= https://oapi.dingtalk.com/robot/send ? access_token=xxxxx "& compile the alertmanager configuration file global: resolve_timeout: 5m smtp_smarthost: 'smtp.qiye.aliyun.com:465' smtp_from:' sxxx@yy.com.com' smtp_auth_username: 'sxxx@yy.com.com' smtp_auth_password:' xxx' smtp_require_tls: falseroute: group_by: [cluster ] group_wait: 10s group_interval: 10s repeat_interval: 1h receiver: 'web.hook'receivers:- name:' web.hook' email_configs:-to: 'sxxx@yy.com.com' webhook_configs:-url:' http://localhost:8060/dingtalk/webhook1/send' send_resolved: false result screenshot
Description of problems encountered 1. If there is an error in the compilation, it may be the go version. two。 The original code go compilation seems to write a dead directory, if something goes wrong, you can do as I wrote. (I don't know exactly, go is not familiar with the language.)
Docker mode
Directly execute the docker program docker run-d-- restart always-p 8060 restart always 8060 timonwong/prometheus-webhook-dingtalk:master-- ding.profile= "webhook1= https://oapi.dingtalk.com/robot/send?access_token=XXXXXX" compile altermanager configuration file docker run-d-- restart always-p 8060 timonwong/prometheus-webhook-dingtalk:v0.3.0-- ding.profile=" webhook1= https://oapi.dingtalk.com/robot/send?access_token=XXXXXX" result screenshot
Encounter description 1. I don't know if there is something wrong with my alarm setting or the program. I still need to continue to improve if I report the wrong nail once. Reference documentation
Connect nails to Prometheus AlertManager WebHook
Configure nail alarm
Docker Mirror
Binary program file
Push nails through webhook
Cetnos7 installs go environment
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 276
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.