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

Blackhole receiver #428

Closed
aecolley opened this issue Jul 14, 2016 · 7 comments
Closed

Blackhole receiver #428

aecolley opened this issue Jul 14, 2016 · 7 comments

Comments

@aecolley
Copy link

Create a receiver which drops all alerts. Currently this requires a workaround involving email or webhook receivers and a dummy server.

Rationale: alertmanager should fully support the page/ticket/log model for alert severity. Alerts of "log" severity should be displayed on a dashboard but otherwise generate no notifications. Unless there's a plan to exclude them from being sent by prometheus to alertmanager, they must be dropped .

@brian-brazil
Copy link
Contributor

prometheus/prometheus#1744

It is not desirable for performance reasons to have non-notifying alerts in the alertmanager.

@aecolley
Copy link
Author

I agree. It's better not to send them at all. How?

@beorn7
Copy link
Member

beorn7 commented Jul 18, 2016

I don't know how to not send an alert at all, but it is perfectly possible to set up a blackhole receiver.
At SoundCloud, we use info level alerts where the (still to be improved) Alertmanager UI serves as an "alerts dashboard" (as suggested by my SRECon talk).

Just configure a receiver with a name only:

receivers:
- name: something-info
  # Deliberately left empty to not deliver anywhere.
- name: some-other-receiver
  email_configs:
  # ...

@beorn7
Copy link
Member

beorn7 commented Jul 18, 2016

I'll close this as blackhole receivers are in fact possible.
The case where you don't want to send an alert notification to AM in the first place is a Prometheus side issue covered in prometheus/prometheus#1744 .

@beorn7 beorn7 closed this as completed Jul 18, 2016
@NightTsarina
Copy link
Contributor

I was trying to do exactly this today, and I could not find how. Wouldn't it be good to add this in the documentation?

@roidelapluie
Copy link
Member

Maybe. Note: You can also drop this at prometheus level (not send certain alerts at all):

alerting:
  alert_relabel_configs:
  - source_labels: [time_window]
    regex: never                                                                                                                          
    action: drop                                                                                                                          

@metost
Copy link

metost commented Sep 2, 2019

Maybe. Note: You can also drop this at prometheus level (not send certain alerts at all):

alerting:
  alert_relabel_configs:
  - source_labels: [time_window]
    regex: never                                                                                                                          
    action: drop                                                                                                                          

@roidelapluie This is pretty interesting, can you elaborate a bit more, for example if I want to drop specific alarm before it goes to alertmanager. Let's say If I want to do this for "alertname": watchdog?
Thanks in advance!

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

6 participants