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
相关推荐
oMcLin17 小时前
如何在 Rocky Linux 8.7 上通过 Prometheus 与 Grafana 结合,提升大规模容器环境的监控与性能分析?
linux·grafana·prometheus
飞翔沫沫情1 天前
Prometheus 监控 ESXi 实战
grafana·prometheus·esxi·vcenter 监控·vsphere 监控
莫非王土也非王臣1 天前
Prometheus监控多个网站状态并推送到企业微信群机器人的完整方案
机器人·企业微信·prometheus
goodlook01232 天前
监控平台搭建-日志-alloy篇(八)
grafana·prometheus
goodlook01233 天前
监控平台搭建-日志-springboot直接推送loki篇(九)
java·spring boot·后端·grafana
三不原则3 天前
实战:Prometheus 监控 GPU 使用率,设置智能告警阈值
prometheus
新钛云服3 天前
Grafana Polystat面板与腾讯云可观测平台的深度融合实践
大数据·云计算·腾讯云·grafana
flying robot4 天前
Prometheus[2.33.3]grafana[12.3.1]监控安装
grafana·prometheus
flying robot4 天前
Grafana对xx-export监控和AlertManager 告警
grafana
一只懒鱼a7 天前
Prometheus和Grafana的安装和使用
grafana·prometheus