====== Сервис adnanh/webhook ======
* [[https://github.com/adnanh/webhook]]
* [[Сервис Prometheus#prometheus-alertmanager]]
* [[Средства программирования shell#Отправка сообщения на все консоли]]
root@server:~# apt install webhook
root@server:~# cat /etc/webhook.conf
[
{
"id": "my-alert-script",
"execute-command": "/usr/local/bin/mywall.sh",
# "execute-command": "/usr/local/bin/mywall_through_llm.sh",
# "execute-command": "/usr/local/bin/my-prometheus-xmpp-alerts.sh",
"command-working-directory": "/tmp",
"pass-arguments-to-command": [
{
"source": "payload",
"name": "alerts"
}
]
}
]
root@server:~# service webhook restart
root@server:~# ###webhook -hooks /etc/webhook.conf -verbose -port 9000
$ curl -X POST -H "Content-Type: application/json" \
-d '{"alerts": "{\"status\": \"firing\", \"message\": \"тестовое сообщение\"}"}' \
http://localhost:9000/hooks/my-alert-script