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

Notify: Several improvements around the suppressed_total metric and… #3723

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

gotjosh
Copy link
Member

@gotjosh gotjosh commented Feb 15, 2024

… logs for muting.

  • Fix the description of the metric to include the fact that the metric is also incremented when the alert is silenced or inhibited.
  • Make the reason constants public so that they can be-reused in projects that consume the Alertmanager as a library
  • Add the reason to the debug line for muting.

… logs for muting.

- Fix the description of the metric to include the fact that the metric is also incremented when the alert is silenced or inhibited.
- Make the reason constants public so that they can be-reused in projects that consume the Alertmanager as a library
- Add the reason to the debug line for muting.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
Copy link
Contributor

@grobinson-grafana grobinson-grafana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@grobinson-grafana
Copy link
Contributor

I also tested the logging for silences and inhibition rules and it looks good:

inhibit_rules:
  - source_matchers:
    - foo=bar
    target_matchers:
    - bar=baz
ts=2024-02-15T11:08:03.335Z caller=dispatch.go:516 level=debug component=dispatcher aggrGroup={}:{} msg=flushing alerts="[[3fff2c2][active] [6ad8c19][active]]"
ts=2024-02-15T11:08:03.335Z caller=notify.go:561 level=debug component=dispatcher msg="Notifications will not be sent for muted alerts" alerts=[[6ad8c19][active]] reason=inhibition
ts=2024-02-15T11:08:03.335Z caller=silence.go:174 level=debug msg="determined current silences state" now=2024-02-15T11:08:03.335969Z total=1 active=1 pending=0
ts=2024-02-15T11:08:03.336Z caller=notify.go:561 level=debug component=dispatcher msg="Notifications will not be sent for muted alerts" alerts=[[3fff2c2][active]] reason=silence

@gotjosh gotjosh merged commit 80b3cb0 into main Feb 15, 2024
12 checks passed
@gotjosh gotjosh deleted the notify-supressed-metrics branch February 15, 2024 11:12
th0th pushed a commit to th0th/alertmanager that referenced this pull request Mar 23, 2024
… logs for muting. (prometheus#3723)

Signed-off-by: Gokhan Sari <gokhan@sari.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants