简体   繁体   English

如何使用 grafana 和 prometheus 计算正常运行时间的百分比

[英]How to calculate percentage of uptime using grafana and prometheus

Currently I am calculating uptime % using below query.目前我正在使用以下查询计算正常运行时间百分比。

But if I try to test by restarting a service that is if i restart at 11:00 and if i try to test at 11:05 it should show 100% availability, but in my case it is not showing that way.但是,如果我尝试通过重新启动服务来进行测试,即如果我在 11:00 重新启动,并且如果我尝试在 11:05 进行测试,它应该显示 100% 的可用性,但在我的情况下,它并没有这样显示。

Please help out with correct calculation for uptime %请帮助正确计算正常运行时间百分比

Query询问

avg_over_time(up{instance="$instance", job!="jobid"}[${__range_s}s])*100

I use this query: avg_over_time(availability:max_uptime:percentage{service=~"$applications"}[$__range])我使用这个查询:avg_over_time(availability:max_uptime:percentage{service=~"$applications"}[$__range])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 grafana singlestat 和 prometheus 计算正常运行时间百分比 - How to calculate uptime percentage using grafana singlestat and prometheus 如何计算 Prometheus Grafana 中的正常运行时间百分比或停机时间百分比 - How to calculate uptime % or Downtime % in Prometheus Grafana Prometheus 正常运行时间或 SLA 百分比超过 Grafana 中的滑动 window - Prometheus Uptime or SLA percentage over sliding window in Grafana 计算多个 prometheus 指标的百分比并在 Grafana 中显示 - Calculate percentage of multiple prometheus metrics and display in Grafana 我试图根据Prometheus blackbox出口商的成功回应计算Grafana的正常运行时间 - Im trying to calculate uptime in Grafana based on the successful responses from Prometheus blackbox exporter 如何通过普罗米修斯查询将二除以计算百分比 - How to divide two by prometheus queries to calculate a percentage 如何用grafana使用prometheus监控多个mysql? - how to Monitoring multiple mysql using prometheus with grafana? 如何使用Prometheus监控grafana中的Windows manchine? - How to monitor windows manchine in grafana using prometheus? 如何计算来自 Grafana 的普罗米修斯查询中的平均值 - How to calculate the average value in a Prometheus query from Grafana Prometheus - 使用 PromQL 根据 API 计算 503 错误计数的百分比 - Prometheus - calculate percentage of 503 error count, per API using PromQL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM