Grafana服务安装并启动

Grafana服务安装并启动

1、介绍

Grafana是一个开源的可视化系统监控和警报工具包。

2、下载Grafana

介绍:Grafana是一个开源的可视化系统监控和警报工具包。

下载地址:https://mirrors.huaweicloud.com/grafana/

下载grafana-enterprise-11.2.0.linux-amd64.tar.gz

3、解压缩文件

执行命令tar -xvf grafana-enterprise-11.2.0.linux-amd64.tar.gz

4、启动Grafana服务

复制代码
nohup ./grafana-server --config.http.port=3000 > nohup.log 2>&1 &

默认端口3000

5、增加数据源,填写Prometheus访问地址

6、增加图表

增加2分钟内500错误次数图表条件查询SQL:

复制代码
sum by(job) (rate(http_server_requests_seconds_count{status="500"}[2m])) * 120

增加CPU使用率图表条件查询SQL:

复制代码
(1 - avg(irate(node_cpu_seconds_total{mode="idle"}[5m])) by (instance)) * 100

增加内存使用率图表条件查询SQL:

复制代码
avg((node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / node_memory_MemTotal_bytes * 100) by (instance)

增加磁盘使用率图表条件查询SQL:

复制代码
avg(100 - (node_filesystem_avail_bytes{mountpoint="/data"} / node_filesystem_size_bytes{mountpoint="/data"} * 100)) by (instance)


相关推荐
运维成长记12 小时前
云原生监控系统 Prometheus大总结 20250909
云原生·prometheus
_何同学1 天前
Spring Boot 监控实战:集成 Prometheus 与 Grafana,打造全方位监控体系
spring boot·grafana·prometheus
g66x3 天前
自建prometheus监控腾讯云k8s集群
kubernetes·腾讯云·prometheus
苦逼IT运维3 天前
Jenkins 监控方案:Prometheus + Grafana 实践
jenkins·grafana·prometheus
迦蓝叶5 天前
JAiRouter 配置文件重构纪实 ——基于单一职责原则的模块化拆分与内聚性提升
java·网关·ai·重构·openai·prometheus·单一职责原则
会飞的小蛮猪6 天前
Jenkins运维之路(权限分配&忘记admin密码)
java·运维·经验分享·jenkins·prometheus
川石课堂软件测试6 天前
Oracle 数据库:视图与索引
数据库·网络协议·nginx·http·oracle·grafana·prometheus
川石课堂软件测试6 天前
Oracle 数据库如何查询列
linux·数据库·sql·功能测试·oracle·grafana·prometheus
川石课堂软件测试7 天前
Oracle 数据库使用事务确保数据的安全
数据库·python·功能测试·docker·oracle·单元测试·prometheus
文人sec10 天前
性能测试-jmeter7-元件提取器
python·jmeter·prometheus·模块测试