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
相关推荐
indexsunny1 天前
互联网大厂Java面试实战:从Spring Boot到微服务架构的深度解析
java·spring boot·spring cloud·kafka·prometheus·security·microservices
**蓝桉**1 天前
Prometheus的服务发现机制
服务发现·prometheus
qq_266348732 天前
Grafana+Loki+Alloy日志采集系统-2
grafana·loki
qq_266348732 天前
Grafana+Loki+Alloy日志采集系统-1
grafana
Triv20252 天前
太阳能船远程信息处理:CAN数据记录 + Grafana仪表板实战案例
grafana·数据可视化·influxdb·嵌入式系统·can总线·数据采集与监控·智能船舶
**蓝桉**2 天前
prometheus监控docker容器(Rocky9)
docker·容器·prometheus
cnskylee2 天前
【Grafana】Grafana大版本升级后的Visualizations迁移说明
grafana
j200103222 天前
Prometheus
k8s·prometheus
lpruoyu2 天前
【云原生】可观测性系统—Prometheus—EFK
云原生·prometheus
**蓝桉**2 天前
Pushgateway的使⽤
grafana·prometheus