发布时间:2020-03-10 10:37:46编辑:admin阅读(2619)
Prometheus是由SoundCloud开发的开源监控报警系统和时序列数据库(TSDB)。Prometheus使用Go语言开发,是Google BorgMon监控系统的开源版本。
操作系统:centos 7.6
ip地址:192.168.31.150
https://prometheus.io/download/
目前最新版是:2.14.0
下载链接:
https://github.com/prometheus/prometheus/releases/download/v2.14.0/prometheus-2.14.0.linux-amd64.tar.gz
useradd prometheus -s /sbin/nologin tar zxvf prometheus-2.14.0.linux-amd64.tar.gz -C /data mv /data/prometheus-2.14.0.linux-amd64 /data/prometheus chown prometheus:prometheus -R /data/prometheus
vi /etc/systemd/system/prometheus.service
内容如下:
[Unit] Description=Prometheus After=network.target [Service] ExecStart=/data/prometheus/prometheus --config.file=/data/prometheus/prometheus.yml --storage.tsdb.path=/data/prometheus/data User=prometheus [Install] WantedBy=multi-user.target
注意:主要修改ExecStart和User
设置开机自启动
systemctl daemon-reload systemctl enable prometheus systemctl start prometheus
查看端口
# ss -tunlp|grep prometheus tcp LISTEN 0 128 :::9090 :::* users:(("prometheus",pid=969,fd=5))
访问targets
http://192.168.31.150:9090/targets
到这里,安装就结束了。
上一篇: linux查看进程内存占用
47745
46237
37110
34627
29229
25886
24745
19863
19417
17909
5716°
6315°
5836°
5888°
6985°
5829°
5846°
6361°
6316°
7673°