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
相关推荐
Yeats_Liao1 天前
时序数据库系列(八):InfluxDB配合Grafana可视化
数据库·后端·grafana·时序数据库
勇敢打工人1 天前
Alertmanager 安装与配置指南
prometheus
牛奶咖啡132 天前
zabbix结合grafana打造自定义炫酷监控界面实战
zabbix·grafana·grafana的安装配置·grafana的插件安装配置·grafana仪表盘的搜索导入·grafana监控zabbix·grafana配置图表
水岸齐天2 天前
prometheus和Grafana介绍
grafana·prometheus
oneslide2 天前
Kubernetes V1.24+ & Docker运行时 grafana容器指标显示异常
docker·kubernetes·grafana
cui_win2 天前
Prometheus实战教程 05 - 告警通知实现 - 邮件 + 钉钉 + 自定义告警模板
钉钉·prometheus·邮件通知
杰克逊的日记3 天前
通过Prometheus对GPU集群进行监控以及搭建(小型集群)
prometheus·gpu算力·gpu服务器监控
happy_king_zi3 天前
RabbitMQ-Exporter 监控 TLS 加密的 RabbitMQ 集群
分布式·安全·rabbitmq·prometheus
青鱼入云4 天前
Grafana介绍
grafana
梁正雄6 天前
6、prometheus资源规划
运维·服务器·服务发现·prometheus·监控