notification are sent but not recieved
Posted: Sun Mar 27, 2016 11:28 am
hi, few weeks back i asked a question that, 'how to send http notifications from nagios', i got a pretty good answer. i created a curl command and added like below in /use/local/nagios/objects/contacts.cfg file.
the curl command works fine on command line.but when i increase load to test nagios notifications then nagios.debug file shows me that contact is notified but no notification is received on the other side. again the curl command is tested before adding into commands.cfg.
any help and suggestion would be appreciated. thanks
Code: Select all
# 'notify-service-by-http' command definition
define command{
command_name notify-service-by-http
command_line /usr/bin/curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"notification":{"host":"$HOSTADDRESS$", "service":"$SERVICEDISPLAYNAME$", "state":"$SERVICESTATE$", "host-state-type":"$SERVICESTATETYPE$", "notification-type":"$NOTIFICATIONTYPE$", "attempts":"$SERVICEATTEMPT$", "max-attempts":"$MAXSERVICEATTEMPTS$", "time":"$TIME$"}}' http://192.168.56.113:8080/things > /tmp/notification.log
}
any help and suggestion would be appreciated. thanks