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
相关推荐
庸子13 分钟前
Kubernetes 可观测性实战:解构 Prometheus + Grafana 企业级监控架构
kubernetes·grafana·prometheus
goodlook01233 小时前
监控平台搭建-钉钉消息通知-dingtalk-webhook篇(四)
grafana·prometheus
goodlook01235 小时前
监控平台搭建-监控指标展示-Grafana篇(五)
java·算法·docker·grafana·prometheus
我爱学习好爱好爱6 小时前
Prometheus监控栈 监控tomcat和消息队列
消息队列·tomcat·prometheus
一周困⁸天.17 小时前
Prometheus
prometheus
ZYMFZ19 小时前
Prometheus 监控平台详解与部署
prometheus
我爱学习好爱好爱1 天前
Prometheus监控栈 监控Springboot2+Vue3+redis项目
数据库·redis·prometheus
一枚正在学习的小白2 天前
prometheus监控对外服务
运维·prometheus
我爱学习好爱好爱4 天前
Prometheus监控栈 监控java程序springboot
java·spring boot·prometheus
忍冬行者4 天前
redis8.0三主三从集群基于prometheus+grafana监控
grafana·prometheus