prometheus-k8s-operator icon indicating copy to clipboard operation
prometheus-k8s-operator copied to clipboard

Changing name of an alert creates a new alert rule

Open Omgzilla opened this issue 11 months ago • 1 comments

Bug Description

We have just started to implement COS-lite stack into our production. When we create the charms, we add rules for grafana-agent to integrate onto prometheus, but when we change the name of a rule and refresh the application, a new rule gets created.

We were able to remove it by commented it out, push it with juju refresh, then remove the file and recreate the charm.

To Reproduce

  1. Include alert rules to a charm
  2. Pack it with charmcraft
  3. Deploy it
  4. Make relations between the charm -> grafana-agent -> COS-lite stack
  5. Check in grafana for alert rules
  6. Change alert name of a rule
  7. Pack it again with charmcraft
  8. Juju refresh
  9. Watch grafana for the new alert rule

Environment

Juju controller v.2.9.43 Clouds

  • Microk8s (latest/stable) -> COS-lite (latest/stable)
  • LXD (v5.0 LTS) -> different charms

Cross-Model using COS-lite and Grafana-Agent (edge)

Relevant log output

Will update this issue when I have reproduced the scenario.

Additional context

No response

Omgzilla avatar Jul 18 '23 16:07 Omgzilla