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 已成功运行。 ![](https://i-blog.csdnimg.cn/direct/075264e3ec6d4357a5a4e67f2d3fe2ce.png) 可以用目标服务器 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面板

相关推荐
chlk12317 小时前
Linux文件权限完全图解:读懂 ls -l 和 chmod 755 背后的秘密
linux·操作系统
舒一笑17 小时前
Ubuntu系统安装CodeX出现问题
linux·后端
改一下配置文件18 小时前
Ubuntu24.04安装NVIDIA驱动完整指南(含Secure Boot解决方案)
linux
深紫色的三北六号1 天前
Linux 服务器磁盘扩容与目录迁移:rsync + bind mount 实现服务无感迁移(无需修改配置)
linux·扩容·服务迁移
SudosuBash1 天前
[CS:APP 3e] 关于对 第 12 章 读/写者的一点思考和题解 (作业 12.19,12.20,12.21)
linux·并发·操作系统(os)
哈基咪怎么可能是AI2 天前
为什么我就想要「线性历史 + Signed Commits」GitHub 却把我当猴耍 🤬🎙️
linux·github
十日十行2 天前
Linux和window共享文件夹
linux
木心月转码ing3 天前
WSL+Cpp开发环境配置
linux
龙码精神3 天前
前端嵌入Grafana 报表的自定义方案:隐藏导航栏保留筛选工具
grafana
崔小汤呀4 天前
最全的docker安装笔记,包含CentOS和Ubuntu
linux·后端