(2)node_exporter部署监控容器主机

发布时间:2020-07-04 17:13:03 作者:TangYGao
来源:网络 阅读:337

监控容器服务器CPU、内存、磁盘、I/O等信息,首先需要安装node_exporter。node_exporter的作用是用于机器系统数据收集。

(1)下载node_exporter
https://prometheus.io/download/
shell> cd /Download/
shell> wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz

(2)解压安装
shell> tar -xvf node_exporter-0.18.1.linux-amd64.tar.gz
shell>cd node_exporter-0.18.1.linux-amd64
shell> mv node_exporter-0.18.1.linux-amd64 node_exporter
shell> chown -R prometheus.prometheus node_exporter
shell> systemctl restart node_exporter
shell>systemctl status node_exporter
shell>netstat -tunlp | grep node_exporter

(3)创建systemd服务
shell>cat > /etc/systemd/system/node_exporter.service << EOF
[Unit]
Description=node_exporter
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/Download/node_exporter/node_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF

shell>systemctl daemon-reload
shell> systemctl start node_exporter #启动node_exporter服务
shell> systemctl status node_exporter

(4)prometheus_server 中添加job
shell> vim /Download/prometheus/prometheus.yml

shell>systemctl restart prometheus #重启prometheus服务

(5)查看prometheus控制台是否获取到了数据
浏览器->x.x.x.x:9090 ->status->targets 就可以看到所监控的node

推荐阅读:
  1. zabbix监控怎么部署
  2. weavescope监控容器

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

node_exporter te %d

上一篇:微信小程序:实现悬浮返回和分享按钮

下一篇:C++ 之新成员(八)

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》