You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my canary, I have this for a metric to capture requests:
- name: "status"
threshold: 1
interval: 1m
query: ((sum(rate(nginx_http_requests_total{kubernetes_namespace="movies",host="_",status=~"499",kubernetes_pod_name=~"staging-[0-9a-zA-Z]+(-[0-9a-zA-Z]+)",}[1m])) or vector(0)) + sum(rate(nginx_http_requests_total{kubernetes_namespace="movies",host="_",status=~"5..",kubernetes_pod_name=~"staging-[0-9a-zA-Z]+(-[0-9a-zA-Z]+)",}[1m])) or vector(0)) / sum(rate(nginx_http_requests_total{kubernetes_namespace="movies",host="_",kubernetes_pod_name=~"staging-[0-9a-zA-Z]+(-[0-9a-zA-Z]+)",}[1m])) * 100
In my logs, I get the error "Metrics server http://flagger-prometheus:9090 query failed for status: error response: {\"status\":\"error\",\"errorType\":\"bad_data\",\"error\":\"invalid parameter 'query': parse error at char 165: unexpected identifier \\\"orvector\\\" in paren expression, expected \\\")\\\"\"}"
It looks like it's getting rid of my spaces. I tried escaping spaces via \ and \\ but that didn't work either.
Does anybody have any hints on how to format this query? If I copy and paste the query into Prom it works just fine.
The text was updated successfully, but these errors were encountered:
In my canary, I have this for a metric to capture requests:
In my logs, I get the error
"Metrics server http://flagger-prometheus:9090 query failed for status: error response: {\"status\":\"error\",\"errorType\":\"bad_data\",\"error\":\"invalid parameter 'query': parse error at char 165: unexpected identifier \\\"orvector\\\" in paren expression, expected \\\")\\\"\"}"
It looks like it's getting rid of my spaces. I tried escaping spaces via
\ and \\
but that didn't work either.Does anybody have any hints on how to format this query? If I copy and paste the query into Prom it works just fine.
The text was updated successfully, but these errors were encountered: