Storing Historical Data into Oracle?

Christopher McAtackney cristoir at gmail.com
Mon Mar 23 12:03:57 CET 2009


2009/3/23 Christopher McAtackney <cristoir at gmail.com>:
> 2009/3/23 Christopher McAtackney <cristoir at gmail.com>:
>>> 2009/3/20 Marc Powell <marc at ena.com>:
>>>>
>>>> On Mar 20, 2009, at 8:48 AM, Christopher McAtackney wrote:
>>>>
>>>>> to start? I'm envisioning some sort of script or service which INSERTs
>>>>> into the Oracle database after each service/host check is performed.
>>>>> Does Nagios support this sort of functionality?
>>>>
>>>> Yes, nagios can run a custom script after every host/service check
>>>> using the ochp and ocsp options --
>>>>
>>>> http://nagios.sourceforge.net/docs/3_0/configmain.html#obsess_over_hosts
>>>> http://nagios.sourceforge.net/docs/3_0/configmain.html#obsess_over_services
>>>>
>>>> It's most often used for Distributed Monitoring but can be used for
>>>> anything. It's been very reliable in my experience.
>>>>
>>>> --
>>>> Marc
>>
>> Hi Marc,
>>
>> I've tried doing as you suggested, but my post check command does not
>> seem to be being executed for some reason. Do you have any idea what I
>> might have done wrong? Here is the setup I've used;
>>
>> In nagios.cfg
>>
>> obsess_over_hosts=1
>> ochp_command=host_check
>>
>> And then in commands.cfg;
>>
>> define command
>> {
>>        command_name    host_check
>>        command_line            /usr/local/nagios/host_check.pl $HOSTADDRESS$ $HOSTEVENTID$
>> }
>>
>> Finally, my simple Perl script to test the output;
>>
>> #!/usr/bin/perl
>> open MYFILE, ">>data.txt";
>> print MYFILE "Logging for server $ARGV[0], Event ID: $ARGV[1] \n";
>> close (MYFILE);
>>
>> Unfortunately, the script is not being called for some reason. I know
>> the script itself is working fine, as I've tested it independently.
>> I've made sure that Nagios is restarted, and the pre-flight check
>> doesn't report any problems. Any thoughts on what the problem might
>> be?
>>
>> Cheers,
>> Chris
>>
>
> Further to the above email, I've also made the nagios user owner of
> the host_check.pl file, but still no luck in getting it to execute.
>

Sorry for the monologue here, but I was messing around with it a bit
more and moved the script file into nagios/libexec to see if that made
any difference. It didn't, but in the interim period between moving
the files, updating the configs and restarting Nagios, I noticed that
the following was logged to nagios/var/nagios.log;

[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?

Thanks again,
Chris

------------------------------------------------------------------------------
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