shell-operator icon indicating copy to clipboard operation
shell-operator copied to clipboard

Add support for webhook to integrate with alertmanager

Open steven166 opened this issue 4 years ago • 2 comments

It would be nice if the shell-operator can call certain hooks when a Prometheus alert happens.

The Prometheus Alertmanager has support for calling webhooks. So the shell-operator could have an endpoint that can listen for external http requests, and call a shell hook based on its POST body.

[alertmanager] ----webhook---> [shell-operator] ---> [shellhook]

steven166 avatar Aug 20 '20 16:08 steven166

Hello! Can you elaborate more on this topic? What is the use case for this integration? Why do you need a subscription to Kubernetes events and to Prometheus alerts?

diafour avatar Aug 24 '20 12:08 diafour

Yeah sure, the main goal is to automate manual operation tasks.

For example: There is a memory leak which takes weeks to find by the dev team. currently: Every time the memory raises to 90%, the ops team gets a notification and have to redeploy the pod manually. new situation: The ops team can write a simple shellhook to automate this action. When ever the alert fires, the shell-operator gets notified by a webhook and executes the related shellhook.

steven166 avatar Sep 08 '20 10:09 steven166