LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   nagios wont run command (https://www.linuxquestions.org/questions/linux-server-73/nagios-wont-run-command-643584/)

noob_d 05-20-2008 02:37 PM

nagios wont run command
 
I've got Nagios 3 installed and working properly. However, I added two commands so that it will phone myself and my boss upon certain things going down. The event log of Nagios shows it has run the command, but our phones never ring.
**I can get wvdial to work properly from the command line and from a shell script.
Any help here is appreciated.

Here are the commands:

# 'call-jeff' command definition
define command{
command_name call-jeff
command_line /usr/bin/wvdial
}

# 'call-darrell' command definition
define command{
command_name call-darrell
command_line /usr/bin/wvdial phone2
}

(of course my wonderful spacing is all jacked, and I dont feel like doing html to format it properly here)

In Nagios' configuration webpage, where you can show all the commands, they are listed along with all the other ones:

call-darrell /usr/bin/wvdial phone2
call-jeff /usr/bin/wvdial

and here is a copy of the event log: (I have Nagios phoning us twice, just to be sure to wake us up)

05-20-2008 12:50:35] HOST NOTIFICATION: adminphone;ops-d01;DOWN;call-jeff;CRITICAL - Host Unreachable (10.201.3.51)

[05-20-2008 12:50:35] HOST NOTIFICATION: adminphone;ops-d01;DOWN;call-jeff;CRITICAL - Host Unreachable (10.201.3.51)

[05-20-2008 12:50:35] HOST NOTIFICATION: adminphone;ops-d01;DOWN;call-darrell;CRITICAL - Host Unreachable (10.201.3.51)

[05-20-2008 12:50:35] HOST NOTIFICATION: adminphone;ops-d01;DOWN;call-darrell;CRITICAL - Host Unreachable (10.201.3.51)

[05-20-2008 12:50:35] HOST NOTIFICATION: adminphone;ops-d01;DOWN;notify-host-by-email;CRITICAL - Host Unreachable (10.201.3.51

unSpawn 05-21-2008 07:32 AM

This basically is a continuation of http://www.linuxquestions.org/questi...n-quit-642465/. I suggest you keep things together. Not only that, but you never took the time to respond to that thread. Bad start.


Quote:

I can get wvdial to work properly from the command line and from a shell script.
Is wvdial setuid root? If thats not it put in a debug statement in your wvdail conf and check your logs.

noob_d 05-23-2008 08:14 AM

First, sorry for not responding so quickly. This is a rush project put on me by my company. Second, I figured this was a seperate issue from the dial-up issue. The dialing issue strictly dealt with Linux dialing out. I had just mentioned that Nagios was the reason. This issue is a Nagios issue, and that's why I stuck it here in Server.

I checked and sure enough, the nagios user did not have rights to ttyS0, so I changed it and now it works! :)


All times are GMT -5. The time now is 06:17 AM.