Storing Historical Data into Oracle?

Christopher McAtackney cristoir at gmail.com
Mon Mar 23 10:57:05 CET 2009


> 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

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