LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-20-2008, 02:37 PM   #1
noob_d
LQ Newbie
 
Registered: Apr 2008
Posts: 13

Rep: Reputation: 1
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
 
Old 05-21-2008, 07:32 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
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.
 
Old 05-23-2008, 08:14 AM   #3
noob_d
LQ Newbie
 
Registered: Apr 2008
Posts: 13

Original Poster
Rep: Reputation: 1
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to run Nagios on Debian 4 andybrr Linux - Networking 2 04-04-2008 01:02 AM
WPA_Supplicant command wont run at boot rmwebs Linux - Networking 2 02-11-2008 05:35 AM
nagios, same command for multiple hosts muha Linux - Software 2 07-04-2007 07:08 AM
system wont run command jackopa Linux - General 3 12-20-2001 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration