oracle_check_health command definition with macros

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
txwomansu
Posts: 36
Joined: Mon Oct 10, 2011 9:05 am

oracle_check_health command definition with macros

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: oracle_check_health command definition with macros

Post by scottwilkerson »

I would have to direct you to the plugin developer's site
http://labs.consol.de/lang/de/nagios/ch ... le_health/
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
txwomansu
Posts: 36
Joined: Mon Oct 10, 2011 9:05 am

Re: oracle_check_health command definition with macros

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: oracle_check_health command definition with macros

Post 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"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked