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

相关推荐
用户23678298016812 分钟前
Linux pgrep 命令详解:按名称查找进程 PID 的高效方法
linux
zzipeng17 分钟前
Linux LCD驱动
linux·运维·服务器
思麟呀28 分钟前
C++11并发编程:call_once一次性执行+atomic原子类型+CAS无锁编程+自旋锁
linux·开发语言·jvm·c++·windows
浮生若城35 分钟前
Linux库制作与原理(2):理解链接与加载
linux·运维·服务器
Cat_Rocky38 分钟前
Gitlab安装与配置
linux·运维·gitlab
爱讲故事的1 小时前
操作系统第一讲复习:为什么学习操作系统,以及操作系统到底在做什么?
linux·开发语言·windows·学习·ubuntu·c#
荒--1 小时前
kali安装与下载、设置(2026)
linux·服务器
sulikey2 小时前
个人Linux操作系统学习笔记4 - makefile
linux·makefile·make·构建
_童年的回忆_2 小时前
【php】在linux下PHP安装amqp扩展
linux·开发语言·php
sxlishaobin2 小时前
linux 自动清除日志 脚本
linux·服务器·前端