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

Exclude Alert Groups #200

Open
mitchellmaler opened this issue May 3, 2019 · 3 comments
Open

Exclude Alert Groups #200

mitchellmaler opened this issue May 3, 2019 · 3 comments

Comments

@mitchellmaler
Copy link
Contributor

I am trying to figure out how I can exclude certain alert groups using the config.jssonnet file.

@mitchellmaler mitchellmaler changed the title Exclude Groups Exclude Alert Groups May 3, 2019
@metalmatze
Copy link
Member

This issue should help you: prometheus-operator/prometheus-operator#2250

@mitchellmaler
Copy link
Contributor Author

@metalmatze Those examples in that only show how to filter our a rule or modify a rule. I am trying to filter out a group.

@nabadger
Copy link

I'm doing something similar now - you could use something like

local ignore_groups = ['kube-scheduler.rules']
{
  // Define a filter function to remove unwanted groups
  filterGroups(ignore_groups):: {
    prometheusAlerts+:: {
      groups: std.filter(
        function(group)
          std.count(ignore_groups, group.name) == 0,
        super.groups
      ),
    },
  },
}

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

No branches or pull requests

3 participants