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
相关推荐
大咖分享课14 小时前
云原生监控体系建设:Prometheus+Grafana的企业级实践
云原生·grafana·prometheus
欧先生^_^2 天前
ingress-nginx 开启 Prometheus 监控 + Grafana 查看指标
nginx·grafana·prometheus
Jeremy_Lee1232 天前
grafana 批量视图备份及恢复(含数据源)
前端·网络·grafana
全栈工程师修炼指南2 天前
Grafana 地图本土化方案:使用高德地图API平替GeoMap地图指南
grafana
临水逸2 天前
可视化大屏工具对比:GoView、DataRoom、积木JimuBI、Metabase、DataEase、Apache Superset 与 Grafana
apache·grafana
XMYX-02 天前
Spring Boot + Prometheus 实现应用监控(基于 Actuator 和 Micrometer)
spring boot·后端·prometheus
SailingCoder3 天前
grafana-mcp-analyzer:基于 MCP 的轻量 AI 分析监控图表的运维神器!
运维·人工智能·typescript·node.js·grafana
xbd_zc5 天前
【使用 Loki + Promtail + Grafana 搭建轻量级容器日志分析平台】
grafana·loki·promtail
时间裂缝里的猫-O-5 天前
@Prometheus 监控-MySQL (Mysqld Exporter)
数据库·mysql·prometheus
qq_312920116 天前
K8S上使用helm部署 Prometheus + Grafana
kubernetes·grafana·prometheus