I've got a python script that I am calling to send the notification but getting a module import error. I've tried installing the missing module but not having any luck.
Here is my code for the command.
Code: Select all
define command {
command_name notify-service-by-telegram
command_line /usr/local/bin/nagios_telegram.py --token $USER4$ --object_type service --contact $USER3$ --notificationtype "$NOTIFICATIONTYPE$" --servicestate "$SERVICESTATE$" --hostname "$HOSTNAME$" --hostaddress "$HOSTADDRESS$" --datetime "$LONGDATETIME$" --output "$SERVICEOUTPUT$" --servicedesc "$SERVICEDESC$" --servicename "$SERVICENAME$"
}
I have tried to execute the script outside of Nagios and it was working so why it won't load the modules I don't know any help would be appreciated.
Thanks
Jonathan