grafana+prometheus监控linux指标

先查看linux架构

root@node-0006 node_exporter-1.6.1.linux-amd64# uname -m

aarch64

我服务器是ARM 架构

所以是下载适用于 ARM64 的 Node Exporter:

新建一个文件夹 进入

复制代码
wget https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-arm64.tar.gz
复制代码
tar -xzf node_exporter-1.6.1.linux-arm64.tar.gz
cd node_exporter-1.6.1.linux-arm64

确保 node_exporter 文件具有可执行权限:

chmod +x node_exporter

启动 Node Exporter:

复制代码
./node_exporter

如果看到大量以 node_ 开头的指标,表示 Node Exporter 已成功运行。

可以用目标服务器 curl http://localhost:9100/metrics

如果服务器是内网,用nginx配置 转发

location /linux_metrics {

proxy_pass http://服务器ip:9100/metrics;

}

这样就用域名访问https://域名/linux_metrics

scrape_configs:

  • job_name: 'prometheus'

static_configs:

  • targets: 'localhost:9090'

  • job_name: 'linux_node_exporter'

metrics_path: '/linux_metrics'

scheme: https

static_configs:

  • targets: '域名'

prometheus有指标了就行

grafana添加linux面板

相关推荐
爱丶狸3 小时前
Grafana_Zabbix_ImageRenderer_部署与前端操作手册
linux·前端·zabbix·grafana·kylin
k4m7v2pz5 小时前
把 Bevy 0.14 游戏移植到 R36S 掌机:一场与“无窗口系统“的搏斗
linux·rust·bevy·r36s·rk3326·开源掌机
木子欢儿6 小时前
Intel 架构的 MacBook Pro 运行 Linux 发热量高解决
linux·运维·服务器
会编程的土豆9 小时前
Go 模板初识
linux·运维·服务器
regret~11 小时前
【记录】网络路由、转发与网卡隔离
linux·服务器·网络
aFakeProgramer11 小时前
Linux版本兼容问题及RTA-VRTE环境配置笔记
linux·笔记
Zhu75811 小时前
在Ubuntu24快速配置专用SFTP
linux·sftp
码农客栈12 小时前
Linux 内核顶层 Makefile 详解
linux
Embedded-Xin12 小时前
Rust学习——Cargo工具
linux·学习·架构·rust·嵌入式
weixin_4357761112 小时前
2026年长沙托育vi设计从风格定位到元素运用的设计方法
linux·运维·服务器·python