<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
Below is the service definition for all 4 cases:<br>
<br>
define service {<br>
use generic-service<br>
host_name DBIGASDS<br>
service_description Reachability via tnsping 1<br>
check_command check_oracle_health! --connect
IGAS --username ABC --password ABC --mode=tnsping --method sqlplus<br>
contacts cosmin<br>
}<br>
define service {<br>
use generic-service<br>
host_name DBIGASDS<br>
service_description Reachability via tnsping 2<br>
check_command check_oracle_health_tnsping<br>
contacts cosmin<br>
<br>
define service {<br>
use generic-service<br>
host_name DBIGASDS<br>
service_description Connection time to DB 1<br>
check_command check_oracle_health!--connect IGAS
--username ABC --password ABC --mode=connection-time<br>
contacts cosmin<br>
}<br>
define service {<br>
use generic-service<br>
host_name DBIGASDS<br>
service_description Connection time to DB 2<br>
check_command check_oracle_health_time<br>
contacts cosmin<br>
<br>
<br>
And this is the command definition:<br>
define command{<br>
command_name check_oracle_health<br>
command_line $USER1$/check_oracle_health $ARG1$<br>
<br>
define command{<br>
command_name check_oracle_health_tnsping<br>
command_line $USER1$/check_oracle_health_tnsping<br>
}<br>
<br>
define command{<br>
command_name check_oracle_health_time<br>
command_line $USER1$/check_oracle_health_time<br>
<br>
<br>
<br>
BUT - a huge discovery when composing this mail. The only service
definition that worked from Nagios was the one which has the
undocumented argument "--method sqlplus".<br>
I think i saw on some forums the use of that paramether in the
beginning, and it remained in the definition.<br>
Anyway, after adding that parammeter to all other service and
command definitions, they started to work miracouslly (but still,
from command line, the plugin is working without --method
argument)<br>
Thank you for asking for command and service definition ;)<br>
<br>
<br>
<br>
<pre class="moz-signature" cols="72"> Cosmin Neagu
NOC Team Leader
Str. I. G. Duca nr. 36
Otopeni, Judetul Ilfov, 075100 Romania
Tel: 021 303 3159 / 0732 669 193
<a class="moz-txt-link-abbreviated" href="http://www.omnilogic.ro">www.omnilogic.ro</a>
</pre>
On 11/07/2012 05:48 PM, Claudio Kuenzler wrote:<br>
</div>
<blockquote
cite="mid:CAF-yqgidMdzfcHxJFXpX12bV95dZfXO9P0DQS7bq0aikY+7SZw@mail.gmail.com"
type="cite"><br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div> So my question for someone who has made
check_oracle_healt work is:<br>
How come all 4 invocation from CLI as nagios user work,
but when Nagios runs them, only 2 of them work.<br>
I know that the error message tells me that there is some
env variable path problem, but why are the first 2 calls
of check_oracle_healt work then?<br>
</div>
</div>
</blockquote>
<div> <br>
Can you, for completion, show your command definitions as well
as the service definition? <br>
<br>
Just fyi: On my installation I used a different way to use
--connect, I used EZCONNECT. <br>
See: <a moz-do-not-send="true"
href="http://labs.consol.de/lang/de/blog/uncategorized/check_oracle_health-kann-ezconnect/">http://labs.consol.de/lang/de/blog/uncategorized/check_oracle_health-kann-ezconnect/</a><br>
<br>
My command definition:<br>
<br>
# check_oracle_health<br>
define command {<br>
command_name check_oracle_health<br>
command_line $USER1$/check_oracle_health --username
$USER3$ --password $USER4$ --mode $ARG1$ --connect
$HOSTADDRESS$:$ARG2$/$ARG3$<br>
}<br>
<br>
And one of the service definitions:<br>
<br>
# Check Oracle<br>
define service{<br>
use generic-service<br>
host_name myoraserver<br>
service_description Oracle Connections<br>
check_command
check_oracle_health!connected-users!1521!SERVICENAME<br>
}<br>
<br>
</div>
<div><br>
</div>
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
<a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/logmein12331_d2d">http://p.sf.net/sfu/logmein12331_d2d</a></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null</pre>
</blockquote>
<br>
</body>
</html>