Storing Historical Data into Oracle?

Andreas Ericsson ae at op5.se
Mon Mar 23 15:46:22 CET 2009


Christopher McAtackney wrote:
> 2009/3/23 Andreas Ericsson <ae at op5.se>:
>> Unless you're an op5 customer and thereby paying for my services, I
>> *really* don't want off-list emails regarding Nagios problems.
>>
>> Thanks for respecting that in the future. Answers are below.
> 
> Sorry, my mistake, I didn't realise I had replied to you directly.
> 
>> Christopher McAtackney wrote:
>>> 2009/3/23 Andreas Ericsson <ae at op5.se>:
>>>> Christopher McAtackney wrote:
>>>>> [1237804472] Warning: Attempting to execute the command
>>>>> "/usr/local/nagios/host_check.pl 127.0.0.1 53" resulted in a return
>>>>> code of 127.  Make sure the script or binary you are trying to execute
>>>>> actually exists...
>>>>>
>>>>> So it appears that Nagios is picking up the command OK, and is at
>>>>> least *attempting* to execute it, but for some reason, nothing is
>>>>> happening. Is there some permissions issue here that I'm unaware of?
>>>>>
>>>> Is host_check.pl executable? If not, try adding "/usr/bin/perl" or do
>>>>  chmod 755 /usr/local/nagios/host_check.pl
>>> Hi Andreas, Frank,
>>>
>>> I updated commands.cfg to point to the perl binary and granted 755
>>> permission on the scripts as you have suggested;
>>>
>>> define command
>>> {
>>>        command_name    host_check
>>>        command_line            /usr/bin/perl $USER1$/host_check.pl
>>> $HOSTADDRESS$ $HOSTEVENTID$
>>> }
>>>
>>> I performed the pre-flight check and everything was fine, restarted
>>> and no problems in the log, but.. still no execution of the plug-ins.
>>> I'm a bit stumped here as to what else might be causing this
>>> problem...
>> How do you verify that the program isn't getting executed? Does it
>> log something to a file with modes 666 every time it's run, or do you
>> just assume this because it doesn't insert the data into the database?
> 
> The program writes out to the text file every time it is run (it's not
> connecting to a database yet, this is just proof-of-concept work). If
> I execute the program from the command line, it writes to this text
> file as expected. However, nothing is being written to the file after
> service / host checks, and therefore I can only guess that it is not
> being executed by Nagios.
> 

When you test it manually, do you test as the same user as Nagios runs
as? If not, are you removing the file the script should write to before
you try letting Nagios run it? Does Nagios have write access to the
directory where the file resides?

It's quite common that people try things like this as root, and then
the file is not writable by nagios, but the script has no sensible way
of letting the user know that, so they think Nagios isn't running the
script at all. I'm 99% sure it's something like that in this case too,
or this list would be cluttered with questions why ocsp/ochp commands
don't work.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list