prometheus / alertmanager

Prometheus Alertmanager
https://prometheus.io
Apache License 2.0
6.63k stars 2.15k forks source link

Add Auto-Submitted: auto-generated header to email notifications #1111

Closed randomvariable closed 4 years ago

randomvariable commented 6 years ago

What did you expect to see? In order to play nicely with email systems, it is best practice to set the following header:

Auto-Submitted: auto-generated as per RFC 8384.

This reduces the possibility of email loops and storms on some email systems.

stuartnelson3 commented 6 years ago

Looking at https://tools.ietf.org/search/rfc3834#section-5.2, I'm wondering about the meaning of "direct responses to other messages".

-  MUST NOT be used on a message issued in direct response to another
      message

While the alertmanager message is being generated, it is directly in response to messages sent by Prometheus. Perhaps someone with more experience could help understand how to interpret this.

@brian-brazil @SuperQ

brian-brazil commented 6 years ago

I'd presume that "message" here means email.

What I'd wonder here if this would cause issues with some ticketing systems etc. which use these to (incorrectly) filter out undesirable messages, for which the user depends on the return "ticket created" message to go somewhere.

randomvariable commented 6 years ago

They must mean email. The concern about ticket flows is valid though. I've just googled a few I've used in the past (OTRS, BMC Remedy), and you can match on that header. However, with FreshDesk, new ticket notifications will be suppressed in the presence of "auto-" values. https://support.freshdesk.com/facebook/support/discussions/topics/1279/page/last

So we should feature flag this. Which way round should the default be?

brian-brazil commented 6 years ago

However, with FreshDesk, new ticket notifications will be suppressed in the presence of "auto-" values.

That's only the notifications, not the creation of the ticket.

I personally would prefer that we don't end up with N different configuration options for various email headers, but rather hardcode some headers that make sense and allow users to add more.

LuboVarga commented 6 years ago

Just to note, I have seen configuration solution like this:

  - name: 'prometheus-alerts-uncategorized'
    email_configs:
      - send_resolved: false
        to: 'prometheus-uncategorized@example.com'
        headers: {'Auto-Submitted':'auto-generated'}
roidelapluie commented 4 years ago

Given that:

  1. It can be added by configuration
  2. It could break existing users
  3. Making it "not mandatory" would complexify the configuration

I think we can close this ; as it is more a configuration management issue.

simonpasquier commented 4 years ago

I agree with @roidelapluie, it can already be supported by Alertmanager today hence there's no need to change the current behavior.

denisse-dev commented 1 year ago

Auto-Submitted: auto-generated

FWIW, it's not RFC 8384 but RFC 3834

randomvariable commented 1 year ago

FWIW, it's not RFC 8384 but RFC 3834

thx, sometimes i'm known to type properly.