Search found 2 matches
- Mon Nov 12, 2012 12:19 pm
- Forum: Open Source Nagios Projects
- Topic: Execute terminal command not working (notificatoin)
- Replies: 2
- Views: 703
Re: Execute terminal command not working (notificatoin)
It's a bit ugly but here's the solution I settled on for now: define command { command_name notify-service-send command_line sudo -u <user to send the message to> /usr/lib64/nagios/plugins/notify '$HOSTNAME$' '$SERVICESTATE$' } And my command script looks like: #!/bin/sh init_notify() { pids=`pgrep ...
- Fri Nov 09, 2012 6:56 pm
- Forum: Open Source Nagios Projects
- Topic: Execute terminal command not working (notificatoin)
- Replies: 2
- Views: 703
Execute terminal command not working (notificatoin)
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...