Skip to content

Conversation

JacobsonMT
Copy link
Contributor

Adds support for new webhook fields:

  • http_config (oauth2 authentication)
  • headers (custom headers)
  • payload (custom payloads)

These new fields contain nested properties, which is currently unsupported by our packing/unpacking logic. Improvements were made in #2330 to facilitate this support and nested propery packing/unpacking is implemented in this PR: 8c096f5

Nested properties are represented by a TypeSet block with MaxItems=1.

Adds support for http_config in a way that is easily extendable to other notifiers when they gain support as well.
@JacobsonMT JacobsonMT requested review from a team as code owners September 4, 2025 19:27
@github-project-automation github-project-automation bot moved this to In review in Alerting Sep 4, 2025
Copy link
Contributor

github-actions bot commented Sep 4, 2025

In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically.
To do so, a Grafana Labs employee must trigger the cloud acceptance tests workflow manually.

- `http_method` (String) The HTTP method to use in the request. Defaults to `POST`.
- `max_alerts` (Number) The maximum number of alerts to send in a single request. This can be helpful in limiting the size of the request body. The default is 0, which indicates no limit.
- `message` (String) Custom message. You can use template variables.
- `payload` (Block Set, Max: 1) Optionally provide a templated payload. Overrides 'Message' and 'Title' field. (see [below for nested schema](#nestedblock--webhook--payload))
- `settings` (Map of String, Sensitive) Additional custom properties to attach to the notifier. Defaults to `map[]`.
- `title` (String) Templated title of the message.
- `tls_config` (Map of String, Sensitive) Allows configuring TLS for the webhook notifier.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it misses hmacConfig

Copy link
Contributor

@yuri-tceretian yuri-tceretian left a comment

Choose a reason for hiding this comment

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

LGTM. It would be great to add field hmacConfig too

@JacobsonMT JacobsonMT merged commit ee29cd1 into main Sep 5, 2025
31 checks passed
@JacobsonMT JacobsonMT deleted the jacobsonmt/update-webhook-schema branch September 5, 2025 19:19
@github-project-automation github-project-automation bot moved this from In review to Done in Alerting Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants