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