美文网首页
使用Prometheus对linux机器进行监控

使用Prometheus对linux机器进行监控

作者: 天草二十六_简村人 | 来源:发表于2022-01-04 17:47 被阅读0次

1、安装node_exporter

wget https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz
 tar xvfz node_exporter-1.3.1.linux-amd64.tar.gz

mv node_exporter-1.3.1.linux-amd64 node-exporter
cd node-exporter

nohup ./node_exporter &

2、prometheus增加拉取地址

端口是9100,示例中的机器ip地址是192.168.8.28。

访问地址:http://192.168.8.28:9100/metrics,能看到已经有指标数据了。

image.png
vi prometheus.yml

- job_name: linux
    metrics_path: '/metrics'
    static_configs:
    - targets: ['192.168.8.28:9100']

3、grafana配置展示的面板

https://grafana.com/dashboards/8919

image.png image.png

相关文章

网友评论

      本文标题:使用Prometheus对linux机器进行监控

      本文链接:https://www.haomeiwen.com/subject/ohziqrtx.html