如果查询中存在条件,则Prometheus系列api调用将失败

时间:2018-03-14 11:23:03

标签: prometheus

我试图使用系列api进行prometheus api调用,但是失败并出现以下错误

{
  "status": "error",
  "errorType": "bad_data",
  "error": "parse error at char 83: could not parse remaining input \"\u003e 0\"..."
}

正在执行的查询是

kube_pod_status_ready{pod=~"cougar-prod-batch-646b68475-dqhrw", condition="true"}  == 0

api电话是

https://prometheus.xxx/api/v1/series?match[]=kube_pod_status_ready%7Bpod%3D~%22cougar-prod-batch-646b68475-dqhrw%22%2C%20condition%3D%22true%22%7D%20%3E%200&start=1521003903&end=1521025503

1 个答案:

答案 0 :(得分:1)

系列匹配API采用选择器,而不是完整的PromQL表达式。您可能想要query API