shell-operator
shell-operator copied to clipboard
Add support for webhook to integrate with alertmanager
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]
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?
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.