Grafana集成prometheus(3.Grafana添加promethus数据)

添加数据库

选择Connections -> Datasources,点击Add New data source,填写Promitheus Server Url,点击 save & test完成配置

添加DashBorad

  • 选择prometheus数据库
  • 选择code
  • 填入对应的查询公式(监控公式参考Prometheus监控公式)
  • 修改面板名称Title
  • 点击save

常见公式记录

百度可以获取常见用途的公式,mark备用。

内存使用率

shell 复制代码
(1- (node_memory_Buffers_bytes + node_memory_Cached_bytes + node_memory_MemFree_bytes) / node_memory_MemTotal_bytes) * 100

读IO

shell 复制代码
sum by (instance) (rate(node_disk_reads_completed_total[1m]))

写IO

shell 复制代码
sum by (instance) (rate(node_disk_writes_completed_total[1m]))

总读写IO

shell 复制代码
rate(node_disk_reads_completed_total[5m]) + rate(node_disk_writes_completed_total[5m])

磁盘监控

shell 复制代码
(1 - node_filesystem_avail_bytes{fstype=~"ext4|xfs"} / node_filesystem_size_bytes{fstype=~"ext4|xfs"}) * 100

可用内存

shell 复制代码
node_memory_Buffers_bytes + node_memory_Cached_bytes + node_memory_MemFree_bytes
相关推荐
家乡的落日18 小时前
微服务监控和简单日志系统搭建grafana+prometheus+node_exporter+promtail+loki
微服务·grafana·prometheus
Gold Steps.18 小时前
Prometheus+Grafana+Alertmanager:云原生部署的 K8s 集群监控架构方案
云原生·grafana·prometheus
AIOps打工人3 天前
Grafana Query MCP:基于FastAPI的Grafana查询转换与分页服务
运维·数据库·python·ai·grafana·fastapi·devops
学Linux的语莫3 天前
prometheus、grafana的docker搭建
docker·容器·prometheus
为什么不问问神奇的海螺呢丶3 天前
服务器巡检报告-基于categraf 采集数据-存入Prometheus-写入mysql后生成报告
服务器·mysql·prometheus
一枚正在学习的小白4 天前
prometheus监控mysql服务
linux·运维·mysql·prometheus
chen_note5 天前
监控——普罗米修斯
grafana·prometheus
闲人编程5 天前
Prometheus监控指标集成指南
prometheus·监控·promql·仪表盘··cncf·codecapsule
木子欢儿6 天前
Prometheus Blackbox域名SSL证书监控并设置AlertManager告警
网络·网络协议·ssl·prometheus
lvbinemail6 天前
Grafana模板自动复制图表
数据库·mysql·zabbix·grafana·监控