仅适合用 CentOS 7
node_export 安装
linux 服务器信息等资源收集安装包
一键安装
|
|
验证
|
|
配置nginx安全访问
如果涉及到外网访问则需要配置密码访问
参考:nginx 添加权限验证
|
|
nginx 的vhost配置 node_exporter.conf
|
|
添加 prometheus 节点
-
配置 host
1 2
vim /etc/hosts 127.0.0.1 mysqld_exporter.io
-
vim /data/local/prometheus/prometheus.yml
在 node_exporter.targets 添加 host:port1 2 3 4 5 6 7
scrape_configs: - job_name: 'node_exporter' static_configs: - targets: ['sgfoot.node_exporter:9100', 'cj.node_exporter.io:80'] basic_auth: username: sgfoot password: sgfoot.pass
-
重启
systemctl restart prometheus