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面板

相关推荐
AR-26710-2 分钟前
Linux Day24——TCP/IP分层与封装
linux·运维
该逃避避3 分钟前
如何利用代理IP进行更好广告验证?
linux·服务器·网络
水饺编程39 分钟前
第2章:Linux 基础,重启命令
linux·c语言·汇编
金色熊族1 小时前
在Qt中使用asan检测内存泄漏(一)
linux·qt·asan
第404号工位1 小时前
“已彻底删除”的照片与文件到底去哪了?我用底层扇区扫描,扒出手机和电脑的幽灵数据
linux·python·架构
硅基手札2 小时前
SPI技术系列 12 · SPI 设备驱动实战
linux·驱动开发·单片机·嵌入式硬件·mcu·性能优化·系统架构
不悔哥2 小时前
ESP32上跑 Linux: 乐鑫给 ESP32-S31开放了官方 BSP
linux·嵌入式硬件·开源
syagain_zsx2 小时前
WebSocket 教程:websocketpp 写 echo 服务端
linux·网络·c++·websocket·网络协议·工具库
爬也要爬着前进2 小时前
Prometheus通过Nginx-vts-exporter模块监控nginx服务
运维·nginx·prometheus
无足鸟ICT2 小时前
【RHCA+】_etc_yum.repos.d_文件名.repo
linux·运维·centos