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如何共享面板
运维·grafana·可观测
何中应3 天前
Grafana如何安装插件
运维·grafana·可观测
疯子的梦想@3 天前
Prometheus 接入 Alertmanager 与钉钉机器人,附中文模板和完整踩坑记录
机器人·钉钉·prometheus
lbb 小魔仙4 天前
Windows搭建PaddleOCR+飞书Webhook自动打卡通知机器人:识别、推送与远程触发完整教程
数据库·人工智能·prometheus·时序数据库
云边有个稻草人5 天前
Prometheus Pushgateway教程:离线任务指标上报、Shell与Python示例、远程访问
开发语言·python·prometheus
广目软件6 天前
HA分布式架构采集节点变更操作手册20261029
运维·服务器·ansible·zabbix·prometheus
tianyuanwo10 天前
Prometheus 服务部署指南:从架构原理到生产级落地
架构·prometheus
看浪的路人13 天前
第8讲:记忆系统的监控与运维——Prometheus 指标、Grafana 面板与告警体系
运维·grafana·prometheus
爬也要爬着前进14 天前
Prometheus通过Nginx-vts-exporter模块监控nginx服务
运维·nginx·prometheus
Crayon Lin14 天前
Prometheus
prometheus