node 安装_CentOS8 - 安装node_exporter服务

简介

Prometheus导出程序,用于* NIX内核公开的硬件和操作系统指标。

ad4ee36558548ea5751c06c77025d3b5.png

安装

vim  /usr/lib/systemd/system/node_exporter.service

配置服务

[Unit]Description=node_exporterAfter=network.target​[Service]Type=simpleExecStart=/opt/node_exporter/node_exporterPrivateTmp=trueRestartSec=5StartLimitInterval=0Restart=always​[Install]WantedBy=multi-user.target
[Unit]Description=node_exporterAfter=network.target​[Service]Type=simpleExecStart=/opt/node_exporter/node_exporterPrivateTmp=trueRestartSec=5StartLimitInterval=0Restart=always​[Install]WantedBy=multi-user.target
91971f101d4725ba6402b76d60f54f97.png

服务管理

systemctl daemon-reload systemctl start node_exporter.servicesystemctl enable node_exporter.service

服务端配置

prometheus添加一个job,配置上对应地址即可。

  - job_name: 'node_exporter'​    # metrics_path defaults to '/metrics'    # scheme defaults to 'http'.​    static_configs:    - targets: ['192.168.100.101:9100']​

然后对prometheus发送HUP信号,即可重载配置

kill -HUP  [PID]

总结

Go程序部署起来就是方便。

9d5f2c6da3e775bd9608ffb936d48bf5.png
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值