Execute terminal command not working (notificatoin)
Posted: Fri Nov 09, 2012 6:56 pm
Hi all,
I'm trying to set up a notification command. I want to use notify-send, like I do from the command line or in Bash scripts. However, the below does not work:
define command {
command_name notify-service-send
command_line /usr/bin/notify-send "$NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$"
}
var/log/messages, var/log/nagios/nagios.log both look like it worked, but I don't see the notification on my desktop. I thought maybe it was sending it to the nagios user's desktop, but I created a test script and executed it as root and it sent it to my user's desktop.
What am I doing wrong?
I'm trying to set up a notification command. I want to use notify-send, like I do from the command line or in Bash scripts. However, the below does not work:
define command {
command_name notify-service-send
command_line /usr/bin/notify-send "$NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$"
}
var/log/messages, var/log/nagios/nagios.log both look like it worked, but I don't see the notification on my desktop. I thought maybe it was sending it to the nagios user's desktop, but I created a test script and executed it as root and it sent it to my user's desktop.
What am I doing wrong?