一次运行两个查询时遇到错误。
查询1:
sum by(container_label_io_kubernetes_pod_name) (rate (container_cpu_usage_seconds_total{container_label_io_kubernetes_container_name=~"demo-api"}[1m]))
输出/输出:
{container_label_io_kubernetes_pod_name="demo-api-demo-api-7c8d7c75d-sfrsg"} 0.15590349995998623
{container_label_io_kubernetes_pod_name="demo-api-demo-api-7c8d7c75d-nnxqz"} 0.22167272938000676
{container_label_io_kubernetes_pod_name="demo-api-demo-api-7c8d7c75d-zbcdk"} 0.14510123627695987
欧瑞2:
avg(kube_pod_container_resource_requests_cpu_cores{container="demo-api"})
输出/输出:
Element Value
{} 1
最终查询(q1/q2):
(sum by(container_label_io_kubernetes_pod_name) (rate (container_cpu_usage_seconds_total{container_label_io_kubernetes_container_name=~"demo-api"}[1m])))
/(avg(kube_pod_container_resource_requests_cpu_cores{container="demo-api"}))
未找到数据点。