grafana / oncall

Developer-friendly incident response with brilliant Slack integration
GNU Affero General Public License v3.0
3.51k stars 291 forks source link

Documentation: Extend Inbound Webhook integrations docs on alert grouping #3049

Open martialblog opened 1 year ago

martialblog commented 1 year ago

What would you like to see!

Hi,

I wasn't sure if I should directly open a PR or an issue for contributing the to docs. So an issue it is.

The docs on "Inbound Webhook integrations for Grafana OnCall" could use some more details on the alert grouping and auto-resolving.

The out-of-the-box the examples did not work as expected for me and I had to dig through the code.

The docs for the inbound webhook state that:

alert_uid: a unique alert ID for grouping. state: either ok or alerting. Helpful for auto-resolving.

I assumed that would mean that I can send an alert with the same alert_uid and a state: alerting to create an Incident and state: ok to resolve the same Incident.

However this does not work with the default webhook integration, since it only groups by alert_uid if is_oncall_heartbeat is in the payload:

grouping_id = """\
{% if "is_oncall_heartbeat" in payload %}
{# Case for heartbeat alerts generated by Grafana OnCall #}
{{- payload.alert_uid }}
{% else %}
{{- payload }}
{% endif %}"""

The alert grouping with the examples on the page works as expected, however the auto-resolve did not. But maybe my expectations/assumptions were wrong.

So anyways, I'd like to extend the page to clarify things.

Thanks, Markus

Product Area

Other

Anything else to add?

No response

github-actions[bot] commented 1 year ago

The current version of Grafana OnCall, at the time this issue was opened, is v1.3.38. If your issue pertains to an older version of Grafana OnCall, please be sure to list it in the PR description. Thank you :smile:!