Page 1 of 1

email / gnokii not working

Posted: Thu May 16, 2013 3:23 am
by hatster
Hi,

Ive installed this before many times and never had a problem but this time i just cant get it working, ive re-installed my opensuse about 10 times now and still no joy.

My commands.cfg looks like this:

define command{
command_name notify-service-by-pager
command_line /bin/echo $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ $SERVICEOUTPUT$ $SHORTDATETIME$ |/usr/bin/gnokii --sendsms xxxxxxxxx
}

i tried changing this command line to: /bin/echo test | >/var/log/test
thinking that this should just generate a text file but it doesnt, if i run it from the command line as root it works fine.

Anyone any ideas ?

thanks.

Re: email / gnokii not working

Posted: Thu May 16, 2013 11:08 am
by abrist
hatster wrote:i tried changing this command line to: /bin/echo test | >/var/log/test
You will get a permission denied error for this as the nagios user should most likely not have write access to /var/log.
Have you verified that gnokii is working correctly? Try running the following from the cli as root (replace xxx.. with your phone number):

Code: Select all

echo "Hello" | gnokii --config /etc/gnokiirc --sendsms +xxxxxxxx