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

Updating alert group based on response from outgoing webhook #5466

Open
kazagz opened this issue Feb 27, 2025 · 1 comment
Open

Updating alert group based on response from outgoing webhook #5466

kazagz opened this issue Feb 27, 2025 · 1 comment

Comments

@kazagz
Copy link

kazagz commented Feb 27, 2025

What would you like to see!

When Outgoing webhook gets triggered by some condition, it would be needed to optionally save response / part of response somewhere in alert group. Ideally it would use same Jinja2 templating function that other components are using.

Example

When alert group is created, it triggers Outgoing webhook to 3rd party ticketing system and response looks like:

{
    "ticketId": "9asd0wjls"
}

There would be something like Response template where you'd specify Jinja2 similar to:

my_ticket_id: {{ response.ticketId }}

The result would be updated alert group:

{
    ...
    "alert_group": {
        "some_custom_prop": {
            "my_ticket_id": "9asd0wjls"
        }
    },
    ...
}

Now when alert group gets resolved, another Outgoing webhook can be triggered to 3rd party system updating ticket:

{
    "ticketId": "{{ alert_group.some_custom_prop.my_ticket_id }}",
    "notes": "Ticket updated"
}

Product Area

Alert Flow & Configuration

Anything else to add?

No response

Copy link
Contributor

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

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

No branches or pull requests

1 participant