Page 1 of 1

oracle_check_health command definition with macros

Posted: Tue Feb 07, 2012 10:08 am
by txwomansu
What is the correct syntax for oracle_check_health command if it will be defined manually and user, password, database sid, hostname, port, mode have to be specified. What are the values for warning and critical statuses for this same command? What triggers critical, warning, and normal statuses? We installed oracle client along with oraclequery wizard according to your manual. The install succedded. We can run this oracle_check_health from shell but not within nagiosxi. This is what succeeds in shell:

/usr/local/nagios/libexec/check_oracle_health --connect "host=hostname.domain.com;sid=sid_name;port=1521" --username=some_user --password="some_password" --mode=sql --name="select 1 from dual".

We believe that ';' symbol prevents successful execution from nagiosxi. We tried to escape it with '/' and '\' (one at a time), specified it as macro, but no luck...

Please help.

Thanks

Re: oracle_check_health command definition with macros

Posted: Tue Feb 07, 2012 11:03 am
by scottwilkerson
I would have to direct you to the plugin developer's site
http://labs.consol.de/lang/de/nagios/ch ... le_health/

Re: oracle_check_health command definition with macros

Posted: Tue Feb 07, 2012 1:23 pm
by txwomansu
Thanks, I will check that URL.

How to escape a ';' in NagiosXI's command definition?

Ex string: host=hostname.domain.com;sid=sid_name;port=1521

Re: oracle_check_health command definition with macros

Posted: Tue Feb 07, 2012 2:40 pm
by scottwilkerson
I am guessing this has to do with escaping as well.

You can try surrounding the $ARG1$ with quotes and then escape the ; in the $ARG1$ like so:

Code: Select all

$USER1$/check_oracle_health --connect "$ARG1$" --username=some_user --password="some_password" --mode=sql --name="select 1 from dual"
Then set
$ARG1$ = "host=hostname.domain.com\;sid=sid_name\;port=1521"