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)


相关推荐
Jinkxs1 小时前
Prometheus - 监控微服务:Spring Boot 应用指标暴露与监控
spring boot·微服务·prometheus
云烟成雨TD7 小时前
Spring AI 1.x 系列【50】可观测性:接入 Prometheus + Grafana
人工智能·spring·prometheus
YDS82918 小时前
DeepSeek RAG&MCP + Agent智能体项目 —— 集成ELK日志管理系统和Prometheus监控系统
java·elk·ai·springboot·agent·prometheus·deepseek
暮云星影1 天前
个人总结 搭建Docker监控
docker·容器·grafana·prometheus
成为你的宁宁4 天前
【基于 Prometheus Operator 监控 K8s控制器、调度器、代理组件】
kubernetes·prometheus
溜达的大象4 天前
服务器挂了等用户报障?我用Prometheus搭了一套监控告警,服务器出状况第一时间通知我
服务器·php·prometheus
tudoSearcher4 天前
日志、指标、链路追踪:可观测性三支柱深度解析
运维·服务器·网络·prometheus
IT策士5 天前
第 41 篇 k8s之监控:Metrics Server 与 Prometheus 快速上手
容器·kubernetes·prometheus
Junsir大斗师5 天前
rocky9.7搭建grafana+loki+prometheus+alloy+node_exporter运维监控平台
linux·运维·grafana·prometheus