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

Webhook Receiver should support custom headers #134

Open
njohnstone2 opened this issue Nov 4, 2023 · 4 comments
Open

Webhook Receiver should support custom headers #134

njohnstone2 opened this issue Nov 4, 2023 · 4 comments

Comments

@njohnstone2
Copy link

The webhook receiver should have the ability to add arbitrary headers to a http request.

When configuring a webhook contact point it is common that the webhook receiver requires additional arbitrary headers to process the request (e.g. "X-" headers).

This issue would also require a UI change in grafana to allow the additional headers to be defined in the UI

@armandgrillet
Copy link
Contributor

The challenge is that we want to unify our receivers with the ones in the Prometheus Alertmanager repository in the long term, and this issue + PR go against that. You should propose the idea to https://github.com/prometheus/alertmanager/issues instead.

@armandgrillet armandgrillet moved this to Waiting for input in Alerting Nov 8, 2023
@armandgrillet armandgrillet removed the status in Alerting Nov 8, 2023
@armandgrillet
Copy link
Contributor

Related PRs:

This does not change the fact that this should first be done in the Prometheus Alertmanager repository so that we do not go against upstream.

@armandgrillet armandgrillet moved this to Inbox in Alerting Nov 16, 2023
@armandgrillet armandgrillet moved this from Needs triage to Backlog in Alerting Jan 3, 2024
@WesselAtWork
Copy link

WesselAtWork commented Jan 10, 2025

Turns out the intended way of dealing with arbitrary alerts in prom/alertmanager is to use a custom middleware that forwards the webhook to the upstream.

There seems to be many many feature requests the effect of "Please Add X Integration" or "Please modify webhooks so we can make arbitrary requests" or a more reasonable "Please allow us to template the body of the webhooks"

It looks like they have decided (implicitly) that the burdun of implementation is on the server side.

I doubt they will be open to adding custom headers, even if they were static.
prometheus/alertmanager#2268

See also:
prometheus/alertmanager#709 (comment)
prometheus/alertmanager#2184 (comment)
prometheus/alertmanager#1496 (comment)


Are there plans to add additional grafana-only receivers?
I don't think there are connector plugins available but I could be wrong.

@christianherweg0807
Copy link

That would be great, especially for routing messages, when replacing the deprecated teams Webhook with PowerAutomate Workflows for multiple Teams Channels.

We think about headers like ChannelID & TeamID to route the Alarm to the correct destination & team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

4 participants