安装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后查看效果

相关推荐
GetcharZp6 小时前
抛弃低效SSH!这套Ansible+Web可视化神器,让你天天准点下班!
后端
weixin_446260859 小时前
HACO:面向动态部署环境的对冲式智能计算可靠多智能体调度框架
后端·python·flask
ttwuai10 小时前
Cursor 生成 CRUD 后,Go 后台接口别只测 200:JWT、RBAC 和 tenant_id 怎么验
开发语言·后端·golang
用户83562907805110 小时前
Python 实现 Excel 页面布局与打印设置自动化
后端·python
用户99314415798410 小时前
微服务框架中获取用户信息
后端
xuanWb11 小时前
手写一个 LLM API 网关:Anthropic 与 OpenAI 协议转换的完整实现
后端
苍何11 小时前
给 Codex 换皮肤这门生意,被我开源了
后端
用户83562907805111 小时前
Python 实现 Excel 命名范围(Named Range)的创建与管理
后端·python
程序员David11 小时前
我让 Claude 从架构文档一路干到代码,踩了三个坑才摸清边界
后端