User Tools

Site Tools


сервис_adnanh_webhook

This is an old revision of the document!


Сервис adnanh/webhook

root@server:~# apt install webhook

root@server:~# cat /etc/webhook.conf
[
  {
    "id": "my-alert-script",
    "execute-command": "/usr/local/bin/mywall.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": "тестовое сообщение"}' \
     http://localhost:9000/hooks/my-alert-script
сервис_adnanh_webhook.1791554533.txt.gz · Last modified: 2026/10/09 17:02 by val