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
相关推荐
牛奶咖啡132 小时前
Prometheus+Grafana构建云原生分布式监控系统(二)
prometheus·prometheus工作流程·prometheus适用场景·prometheus下载安装·prometheus指标解析·ntp时间同步操作·prometheus配置解析
这儿有个昵称18 小时前
互联网大厂Java面试场景:从Spring框架到微服务架构的提问解析
java·spring boot·微服务·kafka·grafana·prometheus·数据库优化
·云扬·2 天前
使用Prometheus+Grafana实现Elasticsearch监控的完整实践
elasticsearch·grafana·prometheus
忍冬行者3 天前
prometheus通过VMware_explorter监控VMware虚拟化集群
云原生·云计算·grafana·prometheus
L1624764 天前
Prometheus、Cadvisor和Grafana体系完整学习手册
学习·grafana·prometheus
·云扬·4 天前
ClickHouse监控体系搭建:基于Prometheus+Grafana实现数据可视化
clickhouse·grafana·prometheus
小二·4 天前
Python Web 开发进阶实战:性能压测与调优 —— Locust + Prometheus + Grafana 构建高并发可观测系统
前端·python·prometheus
zxcxylong5 天前
almalinux下部署promethues+grafana服务-容器化
docker·grafana·prometheus·docker compose·almalinux
A-刘晨阳5 天前
【云原生】Prometheus之PromQL用法详解
运维·云原生·grafana·prometheus·监控·promql
牛奔6 天前
grafana 二次开发,制作镜像流程
grafana