https://www.jianshu.com/p/e59cfd15612e
按照这个链接步骤操作没问题
但注意常用的话,设置开机启动会很方便
[root@prometheus ~]# systemctl enable prometheus
[root@prometheus ~]# systemctl start prometheus
[root@prometheus ~]# systemctl enable grafana
[root@prometheus ~]# systemctl start grafana
[root@prometheus ~]# systemctl enable alertmanager
[root@prometheus ~]# systemctl start alertmanager
[root@prometheus ~]# systemctl enable node_exporter
[root@prometheus ~]# systemctl start node_exporter
之后还会发现进入grafa之后么图形界面没有数据,是因为
/usr/local/prometheus-2.4.3.linux-amd64/prometheus
中的prometheus.yml文件没有添加node_exporter
向其最后添加
- job_name: ‘linux’
static_configs:- targets: [‘本机ip:9100’]
- labels:
instance: 本机ip