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
相关推荐
JasonChen@6662 天前
Prometheus 存储实战:本地 TSDB 配置与 VictoriaMetrics 远端存储对接(18)
grafana·prometheus·victoria
JasonChen@6663 天前
Grafana 权限管理实战:用户授权与 Team 团队管理(17)
grafana·prometheus
JasonChen@6664 天前
pushgateway组件实现自定义监控数据采集(16)
grafana·prometheus·pushgateway
W_son6 天前
14.Grafana 监控看板实战:新建、调优、变量配置全流程
grafana·prometheus
真上帝的左手7 天前
2. 编程语言-Java-Spring Boot-集成SkyWalking + Prometheus 性能工程闭环实战
java·spring boot·性能优化·架构·系统架构·prometheus·skywalking
BullSmall8 天前
Prometheus监控栈安全加固全攻略
安全·grafana·prometheus
JasonChen@66610 天前
prometheus静态监控static_config案例四(10)
grafana·prometheus
JasonChen@66611 天前
prometheus静态监控static_config案例二(8)
grafana·prometheus
JasonChen@66615 天前
prometheus静态监控static_configs案例一(7)
prometheus
lisanmengmeng15 天前
prometheus的rules 配置说明
prometheus