计算一段时间内kubernetes吊舱的可用性

计算一段时间内kubernetes吊舱的可用性,kubernetes,prometheus,grafana,promql,Kubernetes,Prometheus,Grafana,Promql,我需要使用PromQL计算一段时间内kubernetes中pod的可用性百分比。欢迎提出任何建议。我通过以下查询得以实现: (随时间的总和((总和(kube_pod_status_ready{cluster=“$cluster”,condition=“true”,namespace=“$namespace”}))[$availability_span:5m])) / (随时间的总和((总和(kube_pod_status_ready{cluster=“$cluster”,namespace=“$

我需要使用PromQL计算一段时间内kubernetes中pod的可用性百分比。欢迎提出任何建议。

我通过以下查询得以实现:

(随时间的总和((总和(kube_pod_status_ready{cluster=“$cluster”,condition=“true”,namespace=“$namespace”}))[$availability_span:5m])) / (随时间的总和((总和(kube_pod_status_ready{cluster=“$cluster”,namespace=“$namespace”}))[$availability_span:5m])) *一百


我可以通过以下查询实现:

(随时间的总和((总和(kube_pod_status_ready{cluster=“$cluster”,condition=“true”,namespace=“$namespace”}))[$availability_span:5m])) / (随时间的总和((总和(kube_pod_status_ready{cluster=“$cluster”,namespace=“$namespace”}))[$availability_span:5m])) *一百