Prometheus+Grafana+node_exporter 监控 Linux 服务器
Prometheus Grafana DevOps 大约 1459 字node_exporter 下载地址
https://github.com/prometheus/node_exporter/releases
后台启动
nohup /root/exporter/node_exporter-1.3.1/node_exporter > node_exporter.out 2>&1 &
设置开机启动
编辑
vim /etc/systemd/system/node_exporter.service
内容:ExecStart
需要修改为node_exporter
二进制文件的绝对路径
[Unit]
Description=node_exporter
Documentation=https://github.com/prometheus/node_exporter
After=network.target
[Service]
Type=simple
User=root
ExecStart= /root/exporter/node_exporter-1.3.1/node_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target
设为开机启动
sudo systemctl enable node_exporter.service
启动node_exporter
sudo systemctl start node_exporter.service
node_exporter 默认端口
修改 Prometheus 配置
scrape_configs
下新增job_name
为linux
(名称随意)
- job_name: 'linux'
static_configs:
- targets: ['192.168.0.100:9100']
完整的scrape_configs
如下
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: 'linux'
static_configs:
- targets: ['192.168.0.100:9100']
重启 Prometheus
重启后可查看node_exporter
是否上线。
Grafana Dashboard
Node Exporter Full - dashboard id 1860: https://grafana.com/grafana/dashboards/1860
开源地址
阅读 1066 · 发布于 2022-02-19
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
MySQL 中文全文检索 ngram 处理停止词阅读 3824
-
Kubernetes 本地开发调试框架集合阅读 196
-
Linux 之 CentOS yum 安装 Redis阅读 1157
-
Android 禁止 EditText 弹出软件盘阅读 4243
-
Elasticsearch 9200 端口和 9300 端口区别阅读 3412
-
PostgreSQL 修改字段属性阅读 1817
-
Android 每隔一分钟发出时间更新广播阅读 4535
-
Linux 中使用 curl 代替 telnet 测试端口是否连通阅读 12383
-
MySQL 之 where 和 having 的区别阅读 1404
-
MongoDB 集群节点 RECOVERING 故障恢复阅读 4020