安装Grafana并配置Prometheus数据源

系统

本次安装使用的系统为Ubuntu22.04

系统 IP 服务
Ubuntu22.04 192.168.202.221 Prometheus, grafana, blackbox exporter, node exporter
Ubuntu22.04 192.168.202.222 node exporter
Ubuntu22.04 192.168.202.223 node exporter
Ubuntu22.04 192.168.202.224 node exporter

下载安装

sh 复制代码
sudo apt-get install -y adduser libfontconfig1 musl  
wget <https://dl.grafana.com/enterprise/release/grafana-enterprise_10.2.0_amd64.deb>  
sudo dpkg -i grafana-enterprise_10.2.0_amd64.deb

其他Linux发行版可参考下载链接

启动服务

sh 复制代码
systemctl start grafana-server
systemctl enable grafana-server  # 开机自启动

查看端口

grafana默认监听的端口为3000

sh 复制代码
root@node1:~# ss -tunlp
Netid    State     Recv-Q    Send-Q         Local Address:Port          Peer         users:(("sshd",pid=1078,fd=4))               
tcp      LISTEN    0         4096                       *:3000                     *:*        users:(("grafana",pid=12355,fd=15))          

登录

默认用户admin,默认密码admin

添加数据源

grafana带了一些dashboard,可以导入

外部导入dashboard

可以从如下地址下载Grafana dashboard grafana.com/grafana/das...

下载dashboard

导入node exporter dahsboard后查看效果

相关推荐
木雷坞6 小时前
Go 项目实战:用 MLiev IAM 落地企业认证中心
后端·golang·认证
Moment10 小时前
长上下文会最终杀死 Rag 吗?
前端·javascript·后端
蝎子莱莱爱打怪11 小时前
🚀 🚀🚀2026年5月GitHub月榜精选:17个项目中挑出10个推荐,实操4个!
人工智能·后端·ai编程
砍材农夫12 小时前
物联网实战:Spring Boot MQTT | MQTT 设备模拟器演示(附源码)
java·spring boot·后端·物联网·spring·netty
我叫黑大帅12 小时前
解决聊天页内部滚轮改为页面滚动问题
javascript·后端·面试
IT_陈寒13 小时前
Python的线程池居然把我坑在了垃圾回收这块
前端·人工智能·后端
zhangxingchao13 小时前
AI应用开发八:RAG相关技术总结
前端·人工智能·后端
吴佳浩13 小时前
Go史上最大“打脸”现场来了:泛型方法终于实现了
后端·go
Huyuejia13 小时前
runtime-ask
后端
Rust研习社13 小时前
90% 的 Rust 新手都不知道的 3 个实用开发技巧
后端·rust·编程语言