nagios: add parameter for which nagios host is sending the alert

Signed-off-by: Leo Puvilland <leo@craftcat.dev>
This commit is contained in:
Leo Puvilland 2024-01-25 14:20:32 -08:00 committed by ryanlerch
parent bafa98897a
commit fac5a39208

View file

@ -1,4 +1,6 @@
#!/bin/bash
stdin=$(cat)
curl -X POST -H "Content-Type: application/json" -u {{ matrix_nonbot_auth }} https://maubot.apps.ocp.fedoraproject.org/plugin/nonbot-nagios/send?service=$1 -d "$stdin"
host=$(hostname -s)
curl -X POST -H "Content-Type: application/json" -u {{ matrix_nonbot_auth }} https://maubot.apps.ocp.fedoraproject.org/plugin/nonbot-nagios/send?host=$host&service=$1 -d "$stdin"