grafana / oncall

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

In public api, add a view to acknowledge all alert_groups coming from an integration #3680

Open Sin4wd opened 9 months ago

Sin4wd commented 9 months ago

What would you like to see!

This cURL acknowledges all acknowledgeable alert groups in the specified integration.

curl "{{API_URL}}/api/v1/integrations/{{integration_id}}/acknowledge" \
  --request POST \
  --header "Authorization: meowmeowmeow"

Product Area

Other

Anything else to add?

I use a cli to interact with oncall because it's faster and easier. When multiple alerts are firing it's just annoying to ack them one by one. we just need to acknowledge them all. Usually these alerts are related and the oncall will handle them all at once. I have checked the plugin it uses bulk_action method however this is not available on public api. I have also looked around the code and this can be implemented in two ways:

I would be happy to come with a PR if you want.

github-actions[bot] commented 9 months ago

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