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
相关推荐
路由侠内网穿透.3 天前
外网访问可视化工具 Grafana (Linux版本)
linux·运维·服务器·grafana·远程工作
麦兜*3 天前
Spring Boot 应用 Docker 监控:Prometheus + Grafana 全方位监控
spring boot·后端·spring cloud·docker·prometheus
罗不俷5 天前
Prometheus 详解:从原理到实战,打造企业级云原生监控体系
云原生·prometheus
Deamon Tree6 天前
Prometheus和Grafana简介
grafana·prometheus
码界奇点7 天前
Apache IoTDB 架构特性与 PrometheusGrafana 监控体系部署实践
架构·apache·grafana·prometheus·iotdb
Linux-palpitate7 天前
基于Prometheus和Grafana的MySQL监控,服务器监控
服务器·grafana·prometheus
hello_2508 天前
golang程序对接prometheus
开发语言·golang·prometheus
yiqian19899 天前
grafana做状态变化的监控图表
grafana
angushine9 天前
Docker方式安装Prometheus+Grafana+Node Exporter
docker·grafana·prometheus
SRETalk10 天前
夜莺监控设计思考(三)时序库、agent 的一些设计考量
prometheus·可观测性·监控告警·nightingale·opentelemetry·夜莺监控·categraf