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
Rule file which is working fine without using the prom-rule-reloader throws below error while loading through prom-rule-reloader. Is there a way to turn off the rule test ?
E1011 13:14:58.931662 1 main.go:197] Skipping invalid rule file: am-wmeshbto-rxcdqvjp-pnlsnuvn/prometheus-alert-rules-config/pod.rules: [group "PodAlerts", rule 0, "PodNotHealthy": could not parse expression: parse error at char 107: range specification must be preceded by a metric selector, but follows a *promql.AggregateExpr instead]
Here is the rule I am using
groups:
- name: PodAlerts
rules:
- alert: PodNotHealthy
expr: min_over_time(sum by(kubernetes_namespace, kubernetes_pod_name, app, name) (aspnetcore_healthcheck_status)[15m:]) < 1
for: 5m
labels:
severity: high
annotations:
summary: "{{ $labels.name }} in pod {{ $labels.kubernetes_pod_name }} failed"
description: "{{ $labels.name }} for pod {{ $labels.kubernetes_pod_name }} in namespace {{ $labels.kubernetes_namespace }} has been unhealthy for longer than 15m."
The text was updated successfully, but these errors were encountered:
There isn't currently any way of turning off the testing of rules / alerts. The reason you're seeing this is because the version of Prometheus dependencies that the prom-rule-reloader is currently using doesn't support subqueries (https://prometheus.io/blog/2019/01/28/subquery-support/).
I suppose adding a flag to disabling would be one way to get around it, but the proper solution would be to update the dependencies so that support for subqueries is available.
Rule file which is working fine without using the prom-rule-reloader throws below error while loading through prom-rule-reloader. Is there a way to turn off the rule test ?
E1011 13:14:58.931662 1 main.go:197] Skipping invalid rule file: am-wmeshbto-rxcdqvjp-pnlsnuvn/prometheus-alert-rules-config/pod.rules: [group "PodAlerts", rule 0, "PodNotHealthy": could not parse expression: parse error at char 107: range specification must be preceded by a metric selector, but follows a *promql.AggregateExpr instead]
Here is the rule I am using
groups:
- name: PodAlerts
rules:
- alert: PodNotHealthy
expr: min_over_time(sum by(kubernetes_namespace, kubernetes_pod_name, app, name) (aspnetcore_healthcheck_status)[15m:]) < 1
for: 5m
labels:
severity: high
annotations:
summary: "{{ $labels.name }} in pod {{ $labels.kubernetes_pod_name }} failed"
description: "{{ $labels.name }} for pod {{ $labels.kubernetes_pod_name }} in namespace {{ $labels.kubernetes_namespace }} has been unhealthy for longer than 15m."
The text was updated successfully, but these errors were encountered: