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
相关推荐
博同学1 天前
Nginx + ELK + Grafana 全球访问热力图
nginx·elk·grafana
JAVA拾贝1 天前
Prometheus+Grafana运维监控并实现钉钉告警
运维·钉钉·grafana·prometheus·运维监控
微风◝2 天前
12. grafana-Dashboard的Variable(过滤)使用
grafana
TDengine (老段)14 天前
使用 Prometheus 访问 TDengine ---
大数据·数据库·prometheus·时序数据库·iot·tdengine·涛思数据
枫桥听月14 天前
16.大数据监控
大数据·prometheus
广目软件14 天前
GM DC Monitor v2.0 卸载教程
服务器·网络·zabbix·prometheus
不太聪明的样子16 天前
c++ 项目使用 prometheus + grafana 进行实时监控
c++·grafana·prometheus
Detachym20 天前
CentOS下的运维监控Grafana部署
运维·centos·grafana
南夏一木子21 天前
性能测试——搭建Prometheus+Grafana平台
grafana·prometheus
奈斯ing21 天前
【prometheus+Grafana篇】基于Prometheus+Grafana实现postgreSQL数据库的监控与可视化
运维·数据库·信息可视化·grafana·prometheus