-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
How to Alertmanager running shell-script #2046
Comments
You should have a look at https://github.com/imgix/prometheus-am-executor or https://github.com/adnanh/webhook |
Big thanks. I'm gotting this - https://github.com/adnanh/webhook. This is solution IMHO very simple. My steps:
It's very great!!! |
I'm closing the issue then. |
The proposed webhook service seems like a bit more work and additional points of complexity and failure than having alert manager support script running. Can this issue be reopened as a feature request? |
@mchugh19 unfortunately no:
|
It would be great if alert manager can support running shell scripts. |
Running external scripts is the standard and flexible way to integrate with third-party systems. Definitely would like to see it supported. |
https://github.com/adnanh/webhook is a generic webhook receiver written in Go, you can easily use this with alertmanager's webhooks in order to run shell commands. |
@dgl I'm aware of it. That's one more service we have to run, monitor and support. It just makes system more complex and adds yet another moving part. |
in case it help anyone, I do have written a blogpost for helping people using this pattern: https://mallozup.github.io/posts/self-healing-systems-with-prometheus/ |
it is a very useful and common way to perform many kinds of tasks, like scripting,http and tcp request. |
Did this policy change? I see that Telegram support was added in 2022 in #2827 Would that mean a PR for shell-script support would be considered? Seems like if shell-script support was added then it would be very easy for people to add support for notifying 3rd party systems without needing changes to alertmanager. For example Telegram support may have been able to have been done using a shell-script. |
How do we put priority container on adnanh webhook beside auto replication and priority network if it run as container? So the email will for sure run first and it should be on another different kubernetes/docker cluster right? |
having issues is sending payload from alertmanager.yml to Google space/google chat via webhook. getting 400, it is not letting use template or payload in webhook for sending message to google space. Please assist or some example config would be helpful |
Server CentOS7 and intalled alertmanager in OpenShift 3.11.
When some alert is triggered, i want run shell-script.
Now, yml-file in Config Map alertmanager contains block receivers:
webhook_configs:
and he work fine.
In end point i want run command "curl -X POST "https://some-site/?var=text1""
Please, help.
Linux 3.10.0-862.14.4.el7.x86_64 x86_64
alertmanager, version 0.15.1 (branch: HEAD, revision: 8397de1)
build user: root@prometheus-alertmanager-binary-3-build
build date: 20180720-09:32:24
go version: go1.10.3
prometheus, version 2.3.2 (branch: HEAD, revision: 71af5e29e815795e9dd14742ee7725682fa14b7b)
build user: root@prometheus-binary-6-build
build date: 20180720-09:19:12
go version: go1.10.3
The text was updated successfully, but these errors were encountered: