Firstly - what a great product. It's so powerful, I can't believe i've never deployed this solution in our business before!
My question is regarding custom notifications. We're based in the UK and I'd like certain members of the team to receive text notifications when an alert is generated. We use a service called FireText and they have a great API. I've written the script below and it's in place on the Server running NagiosXI, on CentOS 7:
(File location /usr/bin/notify-host-by-firetext.sh, file permissions 777)
Code: Select all
#!/bin/bash
type=$1
host=$2
curl "https://www.firetext.co.uk/api/sendsms?username=development@xxx&password=xxx&message=Type%3A%20${type}%0AHost%3A%20${host}&from=NagiosXI&to=07527552110" >> /var/log/firetext.log
echo "" >> /var/log/firetext.logI've also created a NagiosXI custom command called ''notify-host-by-firetext', and added it to the Alert Settings for the nagiosadmin user (the only user I have for now):
Code: Select all
/usr/bin/notify-host-by-firetext.sh $NOTIFICATIONTYPE$ $HOSTNAME$ $HOSTSTATE$ $HOSTADDRESS$ $HOSTOUTPUT$The problem I have is that the above doesn't appear to be working. I can generate an outage, I receive the email notification, but not a text notification.
Do you know where i'm going wrong?