alertmanager安装02

IT
IT
IT
335
文章
1
评论
2020年3月23日12:03:29 评论 1,114 3005字阅读10分1秒

解压

[root@iZ2ze4v2sdd3v6w7w8doecZ src]# tar zxf alertmanager-0.19.0.linux-amd64.tar.gz
[root@iZ2ze4v2sdd3v6w7w8doecZ src]# mkdir -p /usr/local/prometheus
[root@iZ2ze4v2sdd3v6w7w8doecZ src]# mkdir -p /data/prometheus/alertmanager/data
[root@iZ2ze4v2sdd3v6w7w8doecZ src]# mv alertmanager-0.19.0.linux-amd64 /usr/local/prometheus/alertmanager
[root@iZ2ze4v2sdd3v6w7w8doecZ src]# chown -R prometheus:prometheus /usr/local/prometheus /data/prometheus

添加启动服务

[root@iZ2ze4v2sdd3v6w7w8doecZ src]# vim /usr/lib/systemd/system/alertmanager.service
[Unit]
Description=Alertmanager
After=network.target
  
[Service]
Type=simple
User=prometheus
ExecStart=/usr/local/prometheus/alertmanager/alertmanager --config.file=/usr/local/prometheus/alertmanager/alertmanager.yml --storage.path=/data/prometheus/alertmanager/data
Restart=on-failure
  
[Install]
WantedBy=multi-user.target

启动

[root@iZ2ze4v2sdd3v6w7w8doecZ src]# systemctl enable alertmanager.service
Created symlink from /etc/systemd/system/multi-user.target.wants/alertmanager.service to /usr/lib/systemd/system/alertmanager.service.
[root@iZ2ze4v2sdd3v6w7w8doecZ src]#  systemctl start alertmanager.service
[root@iZ2ze4v2sdd3v6w7w8doecZ src]#  systemctl status alertmanager.service
● alertmanager.service - Alertmanager
   Loaded: loaded (/usr/lib/systemd/system/alertmanager.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2019-10-26 16:58:28 CST; 8s ago
 Main PID: 11771 (alertmanager)
   CGroup: /system.slice/alertmanager.service
           └─11771 /usr/local/prometheus/alertmanager/alertmanager --config.file=/usr/local/prometheus/alertmanager/alertmanager.yml --storage.path=/data/prometheus/alertm...
 
Oct 26 16:58:28 iZ2ze4v2sdd3v6w7w8doecZ systemd[1]: Started Alertmanager.
Oct 26 16:58:28 iZ2ze4v2sdd3v6w7w8doecZ alertmanager[11771]: level=info ts=2019-10-26T08:58:28.480Z caller=main.go:217 msg="Starting Alertmanager" version="(versi...168914a)"
Oct 26 16:58:28 iZ2ze4v2sdd3v6w7w8doecZ alertmanager[11771]: level=info ts=2019-10-26T08:58:28.480Z caller=main.go:218 build_context="(go=go1.12.8, user=root@587d...5:01:40)"
Oct 26 16:58:28 iZ2ze4v2sdd3v6w7w8doecZ alertmanager[11771]: level=info ts=2019-10-26T08:58:28.480Z caller=cluster.go:161 component=cluster msg="setting advertise...port=9094
Oct 26 16:58:28 iZ2ze4v2sdd3v6w7w8doecZ alertmanager[11771]: level=info ts=2019-10-26T08:58:28.481Z caller=cluster.go:623 component=cluster msg="Waiting for gossi...terval=2s
Oct 26 16:58:28 iZ2ze4v2sdd3v6w7w8doecZ alertmanager[11771]: level=info ts=2019-10-26T08:58:28.506Z caller=coordinator.go:119 component=configuration msg="Loading...nager.yml
Oct 26 16:58:28 iZ2ze4v2sdd3v6w7w8doecZ alertmanager[11771]: level=info ts=2019-10-26T08:58:28.506Z caller=coordinator.go:131 component=configuration msg="Complet...nager.yml
Oct 26 16:58:28 iZ2ze4v2sdd3v6w7w8doecZ alertmanager[11771]: level=info ts=2019-10-26T08:58:28.508Z caller=main.go:466 msg=Listening address=:9093
Oct 26 16:58:30 iZ2ze4v2sdd3v6w7w8doecZ alertmanager[11771]: level=info ts=2019-10-26T08:58:30.481Z caller=cluster.go:648 component=cluster msg="gossip not settle...00070819s
Hint: Some lines were ellipsized, use -l to show in full.
[root@iZ2ze4v2sdd3v6w7w8doecZ src]#

页面访问地址

IP:9093

alertmanager安装02

下载信息 alertmanager-0.19.0.linux-amd64.tar.gz
网盘密码:登录可见
下载地址
继续阅读
  • 我的QQ
  • QQ扫一扫
  • weinxin
  • 我的头条
  • 头条扫一扫
  • weinxin
IT
  • 本文由 发表于 2020年3月23日12:03:29
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
Alertmanager 钉钉报警05 prometheus

Alertmanager 钉钉报警05

配置文件 alertmanager的webhook集成了钉钉报警,所以他不是本来就有的。钉钉对格式要求很严格,一会还需要使用插件进行格式转换。 # vim alertmanager.yml globa...
完全删除zabbix zabbix

完全删除zabbix

停止服务 $ sudo systemctl stop zabbix-agent.service 简单直接暴力 $ sudo find / -name zabbix-agent | xargs rm -...