Skip to content

Conversation

@siavashs
Copy link
Contributor

@siavashs siavashs commented Oct 24, 2025

Add metrics for inhibitor:

  • alertmanager_inhibitor_source_alerts_cache_items
  • alertmanager_inhibitor_source_alerts_index_items
  • alertmanager_inhibitor_mutes_duration_seconds

Add metrics for inhibition rules:

  • alertmanager_inhibit_rule_source_alerts_cache_items
  • alertmanager_inhibit_rule_source_alerts_index_items
  • alertmanager_inhibit_rule_matches_duration_seconds
  • alertmanager_inhibit_rule_mutes_duration_seconds

Other changes:

  • Add debug logs for duplicate inhibition rule names
  • Add Len() method to store.Alerts struct
  • Add Len() method to inhibit.index struct
  • updated docs

@siavashs siavashs force-pushed the feat/add-inhibition-metrics branch 3 times, most recently from 843997c to 2851b0d Compare October 24, 2025 09:22
@siavashs siavashs force-pushed the feat/add-inhibition-metrics branch 3 times, most recently from 5c7749f to 7d259e1 Compare October 24, 2025 10:05
@siavashs siavashs requested a review from SuperQ October 24, 2025 10:09
Copy link

@MichaHoffmann MichaHoffmann left a comment

Choose a reason for hiding this comment

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

lgtm

@siavashs siavashs force-pushed the feat/add-inhibition-metrics branch 2 times, most recently from 7439ab2 to 95b6616 Compare October 24, 2025 14:39
Add metrics for inhibitor:
- alertmanager_inhibitor_source_alerts_cache_items
- alertmanager_inhibitor_source_alerts_index_items
- alertmanager_inhibitor_mutes_duration_seconds

Add metrics for inhibition rules:
- alertmanager_inhibit_rule_source_alerts_cache_items
- alertmanager_inhibit_rule_source_alerts_index_items
- alertmanager_inhibit_rule_matches_duration_seconds
- alertmanager_inhibit_rule_mutes_duration_seconds

Other changes:
- Add debug logs for duplicate inhibition rule names
- Add Len() method to store.Alerts struct
- Add Len() method to inhibit.index struct
- update docs

Signed-off-by: Siavash Safi <[email protected]>
@siavashs siavashs force-pushed the feat/add-inhibition-metrics branch from 95b6616 to 3f04c9f Compare October 25, 2025 10:12
@SuperQ SuperQ merged commit f2fbb31 into prometheus:main Oct 25, 2025
7 checks passed
@siavashs siavashs deleted the feat/add-inhibition-metrics branch October 25, 2025 12:12
holger-waschke pushed a commit to holger-waschke/alertmanager that referenced this pull request Nov 1, 2025
Add metrics for inhibitor:
- alertmanager_inhibitor_source_alerts_cache_items
- alertmanager_inhibitor_source_alerts_index_items
- alertmanager_inhibitor_mutes_duration_seconds

Add metrics for inhibition rules:
- alertmanager_inhibit_rule_source_alerts_cache_items
- alertmanager_inhibit_rule_source_alerts_index_items
- alertmanager_inhibit_rule_matches_duration_seconds
- alertmanager_inhibit_rule_mutes_duration_seconds

Other changes:
- Add debug logs for duplicate inhibition rule names
- Add Len() method to store.Alerts struct
- Add Len() method to inhibit.index struct
- update docs

Signed-off-by: Siavash Safi <[email protected]>
Signed-off-by: Holger Waschke <[email protected]>
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.

3 participants