Prometheus+grafana+alertmanager 部署文档

蚀窗继承
• 阅读 566

grafana

[root@vm5 ~]# wget https://dl.grafana.com/oss/release/grafana-10.0.0.linux-amd64.tar.gz
 
[root@vm5 ~]# tar -xf grafana-10.0.0.linux-amd64.tar.gz

[root@vm5 ~]# mv grafana-10.0.0 /home/grafana

[root@vm5 ~]# cat /usr/lib/systemd/system/grafana.service
[Unit]
Description=Grafana Server
After=network-online.target

[Service]
Restart=on-failure
ExecStart=/home/grafana/bin/grafana-server -config /home/grafana/conf/defaults.ini -homepath /home/grafana

[Install]
WantedBy=multi-user.target


[root@vm5 ~]# systemctl daemon-reload
[root@vm5 ~]# systemctl start grafana
[root@vm5 ~]# systemctl enable grafana

prometheus

https://prometheus.io/download/
[root@vm11 ~]# tar -xf prometheus-2.44.0.linux-amd64.tar.gz

[root@vm11 ~]# mv prometheus-2.44.0 /opt/prometheus
[root@vm11 ~]# cat /usr/lib/systemd/system/prometheus.service
[Unit]
Description=Prometheus server Daemon
After=network.target
[Service]
Type=simple
User=root
Group=root
ExecStart=/opt/prometheus/prometheus --web.listen-address=0.0.0.0:37090 --config.file=/opt/prometheus/prometheus.yml  --storage.tsdb.path=/opt/data/prometheus  --storage.tsdb.retention=15d --web.enable-lifecycle
Restart = on-failure
[Install]
WantedBy=multi-user.target

[root@vm5 ~]# systemctl daemon-reload
[root@vm5 ~]# systemctl start prometheus
[root@vm5 ~]# systemctl enable prometheus

alertmanager

wget https://github.com/prometheus/alertmanager/releases/download/v0.24.0/alertmanager-0.24.0.linux-amd64.tar.gz
tar -xf  alertmanager-0.25.0.linux-amd64.tar.gz 
mv alertmanager-0.25.0.linux-amd64 /opt/alertmanager

vim /etc/systemd/system/alertmanager.service
[Unit]
Description=AlertManager Service
After=network.target

[Service]
Restart=always
ExecStart=/opt/alertmanager/alertmanager --config.file=/opt/alertmanager/alertmanager.yml --web.listen-address=0.0.0.0:33093
Type=simple
User=root
Group=root

[Install]
WantedBy=multi-user.target




systemctl daemon-reload && systemctl start alertmanager && systemctl enable alertmanager
点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
美凌格栋栋酱 美凌格栋栋酱
6个月前
Oracle 分组与拼接字符串同时使用
SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(
Johnny21 Johnny21
4年前
Promtheus实战系列(一)之环境部署与搭建
一、部署prometheus,grafana和node\_exporterPrometheus开始教程:1.1环境(centos7)root@localhostprometheusunameaLinuxlocalhost.localdomain3.10
Stella981 Stella981
3年前
Prometheus部署+邮箱告警+企业微信告警+钉钉告警
Prometheus部署邮箱报警企业微信报警钉钉报警1部署Prometheusserver1.1下载二进制包$wgethttps://github.com/prometheus/prometheus/releases/download/v2
Stella981 Stella981
3年前
Prometheus + Grafana +Alertmanager监控报警k8s集群
prometheus监控k8s集群具体版本Prometheus:v2.2.1kubernetes:v1.18.9Grafana:latestalertmanager:v0.14.0metrics:v1.3.0
Stella981 Stella981
3年前
SpringBoot整合Redis乱码原因及解决方案
问题描述:springboot使用springdataredis存储数据时乱码rediskey/value出现\\xAC\\xED\\x00\\x05t\\x00\\x05问题分析:查看RedisTemplate类!(https://oscimg.oschina.net/oscnet/0a85565fa
Stella981 Stella981
3年前
SpringBoot使用RedisTemplate操作Redis时,key值出现 -xac-xed-x00-x05t-x00-tb
原因分析原因与RedisTemplate源码中的默认序列化方式有关defaultSerializernewJdkSerializationRedisSerializer(classLoader!null?classLoader:this.getClass().getClassLoader()
Easter79 Easter79
3年前
SpringBoot整合Redis乱码原因及解决方案
问题描述:springboot使用springdataredis存储数据时乱码rediskey/value出现\\xAC\\xED\\x00\\x05t\\x00\\x05问题分析:查看RedisTemplate类!(https://oscimg.oschina.net/oscnet/0a85565fa
Wesley13 Wesley13
3年前
MYSQL主从同步故障解决(主键重复)
MYSQL主从同步故障解决(主键重复)转载2010年04月05日18:52:00标签:mysql(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fso.csdn.net%2Fso%2Fsearch%2Fs.do%3Fq%
Stella981 Stella981
3年前
SAP成都研究院DevOps那些事
!00logo.png(https://oscimg.oschina.net/oscnet/upc4ad68e1489dd93a27450e019a05f7e5.png)!01盗图.png(https://oscimg.oschina.net/oscnet/up63b04cf78c14f773e5c3511cf204d9a1.png)
Easter79 Easter79
3年前
SpringBoot使用RedisTemplate操作Redis时,key值出现 -xac-xed-x00-x05t-x00-tb
原因分析原因与RedisTemplate源码中的默认序列化方式有关defaultSerializernewJdkSerializationRedisSerializer(classLoader!null?classLoader:this.getClass().getClassLoader()