<br><font size=2 face="sans-serif">Hi Christopher,</font>
<br>
<br><font size=2 face="sans-serif">You must indicate the path of the command
perl : <b>/usr/bin/perl</b> </font><font size=2><tt>/usr/local/nagios/host_check.pl
$HOSTADDRESS$ $HOSTEVENTID$ if you don't have enable EPn.</tt></font>
<br>
<br><font size=2><tt>Sincerly</tt></font>
<br>
<br><font size=2 face="sans-serif">Frank</font>
<br><font size=2 face="sans-serif"><br>
[ENVOYE PAR INTERNET]<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Christopher McAtackney
<cristoir@gmail.com></b> </font>
<p><font size=1 face="sans-serif">23/03/2009 10:57</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">Nagios Users <Nagios-users@lists.sourceforge.net></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: [Nagios-users] Storing Historical
Data into Oracle?</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>> 2009/3/20 Marc Powell <marc@ena.com>:<br>
>><br>
>> On Mar 20, 2009, at 8:48 AM, Christopher McAtackney wrote:<br>
>><br>
>>> to start? I'm envisioning some sort of script or service which
INSERTs<br>
>>> into the Oracle database after each service/host check is
performed.<br>
>>> Does Nagios support this sort of functionality?<br>
>><br>
>> Yes, nagios can run a custom script after every host/service check<br>
>> using the ochp and ocsp options --<br>
>><br>
>> http://nagios.sourceforge.net/docs/3_0/configmain.html#obsess_over_hosts<br>
>> http://nagios.sourceforge.net/docs/3_0/configmain.html#obsess_over_services<br>
>><br>
>> It's most often used for Distributed Monitoring but can be used
for<br>
>> anything. It's been very reliable in my experience.<br>
>><br>
>> --<br>
>> Marc<br>
<br>
Hi Marc,<br>
<br>
I've tried doing as you suggested, but my post check command does not<br>
seem to be being executed for some reason. Do you have any idea what I<br>
might have done wrong? Here is the setup I've used;<br>
<br>
In nagios.cfg<br>
<br>
obsess_over_hosts=1<br>
ochp_command=host_check<br>
<br>
And then in commands.cfg;<br>
<br>
define command<br>
{<br>
                
command_name                
host_check<br>
                
command_line                
                 /usr/local/nagios/host_check.pl
$HOSTADDRESS$ $HOSTEVENTID$<br>
}<br>
<br>
Finally, my simple Perl script to test the output;<br>
<br>
#!/usr/bin/perl<br>
open MYFILE, ">>data.txt";<br>
print MYFILE "Logging for server $ARGV[0], Event ID: $ARGV[1] \n";<br>
close (MYFILE);<br>
<br>
Unfortunately, the script is not being called for some reason. I know<br>
the script itself is working fine, as I've tested it independently.<br>
I've made sure that Nagios is restarted, and the pre-flight check<br>
doesn't report any problems. Any thoughts on what the problem might<br>
be?<br>
<br>
Cheers,<br>
Chris<br>
<br>
------------------------------------------------------------------------------<br>
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are<br>
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and<br>
easily build your RIAs with Flex Builder, the Eclipse(TM)based development<br>
software that enables intelligent coding and step-through debugging.<br>
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com<br>
_______________________________________________<br>
Nagios-users mailing list<br>
Nagios-users@lists.sourceforge.net<br>
https://lists.sourceforge.net/lists/listinfo/nagios-users<br>
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue. <br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</tt></font>
<br>