Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrongly formatted alert rules are silently not loaded #166

Open
Abuelodelanada opened this issue Dec 11, 2024 · 0 comments
Open

Wrongly formatted alert rules are silently not loaded #166

Abuelodelanada opened this issue Dec 11, 2024 · 0 comments

Comments

@Abuelodelanada
Copy link
Contributor

Enhancement Proposal

When relating Prometheus to a charm that provides alert rules (for instance cos-configuratior) and some of the alert rules are not well formatted, Prometheus silently does not load those alert rules.

So for instance if you relate prometheus to cos-configurator with this alert rule where the expr is wrongly indented, the alert rule is silently not loaded into Prometheus.

groups:
- name: Custom JVM Rules
  rules:
    - alert: Custom JVM Usage
      annotations:
        description: " The broker {{ $labels.instance }} has high memory usage ({{ $value }}>85%) for more than 10 minutes."
        summary: "Broker {{ $labels.instance }} :: Critical :: Memory usage is {{ $value }}%"
        expr:  ((sum without(area)(jvm_memory_bytes_used{juju_charm!=".*"}) / 1024 / 1024) / (sum without(area)(jvm_memory_bytes_max{juju_charm!=".*"}) / 1024 / 1024)) * 100 > 85
      for: 5m
      labels:
        severity: critical

Related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant