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
相关推荐
qq_4523962312 分钟前
第二篇:《LGTM 栈全景:Loki、Grafana、Tempo、Mimir 的协同作战》
grafana
heimeiyingwang1 小时前
【Prometheus·入门篇】数据模型:Metric 类型、标签与时间序列
prometheus
白鲸开源8 小时前
DolphinScheduler 挂了你不知道?Prometheus + Grafana 监控兜底方案,亲测可用
开源·grafana·监控
heimeiyingwang10 小时前
【Prometheus·部署篇】配置详解:scrape_config、relabeling 与服务发现
prometheus
mmsy10243 天前
Grafana 使用文档
grafana
heimeiyingwang4 天前
【Prometheus·入门篇】Prometheus 是什么:从 Nagios 到云原生监控的演进
prometheus
秋风点枝5 天前
第一篇:认识 Prometheus —— 云原生监控的基础
云原生·prometheus
名字还没想好☜5 天前
Prometheus 告警实战:写 alerting rules、用 Alertmanager 做路由分组与抑制
运维·前端·javascript·docker·kubernetes·prometheus
SamChan906 天前
用Prometheus+Grafana搭建PDF翻译服务监控看板:指标采集与告警实战
python·ai·pdf·grafana·prometheus·机器翻译
^酸酸6 天前
Prometheus 监控架构部署实战:二进制与 Docker 双方案
docker·架构·prometheus