1、node_exporter下载

node_exporter-1.3.1.linux-amd64.tar.gz

tar -xzvf node_exporter-1.3.1.linux-amd64.tar.gz -C /usr/local

2、配置文件

cat >/etc/systemd/system/node_exporter.service<<EOF
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target

[Service]
User=prometheus
ExecStart=/usr/local/node_exporter/node_exporter --collector.netstat --log.level=error --web.listen-address=0.0.0.0:9100

[Install]
WantedBy=default.target
EOF

mysqld_exporter:

cat > /etc/systemd/system/mysqld_exporter.service<<EOF
[Unit]
Description=Prometheus MySQL Exporter
After=network.target

[Service]
Type=simple
Restart=always
User=prometheus
ExecStart=/usr/local/mysqld_exporter/mysqld_exporter --config.my-cnf /usr/local/mysqld_exporter/my.cnf --collect.info_schema.innodb_tablespaces --collect.perf_schema.eventsstatementssum --collect.perf_schema.memory_events --log.level=error --web.listen-address=0.0.0.0:9104

[Install]
WantedBy=multi-user.target
EOF

3、启动

systemctl daemon-reload

systemctl start node_exporter

systemctl status node_exporter

最新文章

  1. instanceof运算符
  2. LeetCode 445 Add Two Numbers II
  3. 一个解决chrome浏览器下input标签当autocomplete的时候背景变黄色同时input背景图片消失方案
  4. 《TCP/IP详解 卷一》读书笔记-----第三章 IP
  5. 3.精通前端系列技术之深入学习Jquery(一)
  6. 总结 output 用法
  7. C#中的virtual &amp; override
  8. leetcode-Rising Temperature
  9. hdu_5965_扫雷(递推)
  10. java连接mysql源码
  11. MySQL Command Line Client显示中文的部分为空
  12. 更优雅的方式: JavaScript 中顺序执行异步函数
  13. 选择语句--switch
  14. Cannot redeclare C() (previously declared in .
  15. Linux中一个文件10行内容,如何输出5-8内容到屏幕
  16. nginx官方模块之http_random_index_module
  17. 前端本地存储localStorage
  18. 5.1Python函数(一)
  19. American Football Vocabulary!
  20. Swift 里 Set(二)概览

热门文章

  1. 清除Linux登录记录
  2. 简单的自动清理TIM/QQ聊天垃圾文件方案
  3. ES使用
  4. react native 中 fetch获取请求头header 的token信息
  5. 云函数调用云函数 openid不存在
  6. Java多线程编程技术方案原理
  7. 智能插座的制作(esp01,继电器,arduino)
  8. Swift中使用KVO
  9. 性能再升级,XMeter Cloud 专业版正式上线
  10. Vue项目在IE报错SCRIPT1003: 缺少&#39; : &#39;,导致页面空白的解决方案