Page 1 of 1

Oracle health check tablespace utilization output

Posted: Fri Jul 27, 2018 7:31 am
by nagiosEngie
Hello Nagios Crew,
I am trying to get a more readable output on the oracle:_health check.
When I run the command:

[[email protected] ~]$ /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib ORACLE_HOME=/usr/lib/oracle/12.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect '
SID' --username 'xxxxuser' --password 'xxxxpass' --mode tablespace-usage --warning 90 --critical 98


the output will give the state of all tablespaces, which I can live with although not very tidy. But when I get an allarm I would like to just see the name of the tablespace impacted and not the rest of the information. Is there any option to do this?

Thanks

Sandro

Re: Oracle health check tablespace utilization output

Posted: Fri Jul 27, 2018 9:00 am
by mcapra
Here's a previous post of mine with some suggestions on this topic:
https://support.nagios.com/forum/viewto ... 08#p240208

The short answer lies in the check_oracle_health documentation:

Code: Select all

-–tablespace
With this you can limit the check of a single tablespace. If this parameter is omitted all tablespaces are checked.

Re: Oracle health check tablespace utilization output

Posted: Fri Jul 27, 2018 11:29 am
by scottwilkerson
Thanks @mcapra

Re: Oracle health check tablespace utilization output

Posted: Tue Jul 31, 2018 2:31 am
by nagiosEngie
HEllo,
thanks for your help. So basicly I have to check every single tablespace separately. This has a big fault although. If anyone adds a tablespace it will not be monitored automatically but the DB team will have to communicate it to the monitoring team which in my case dose not happen :-D.

SAndro

Re: Oracle health check tablespace utilization output

Posted: Tue Jul 31, 2018 6:16 am
by mcapra
You could automate the configuration of newly discovered table spaces with the Nagios XI REST API (see the "Help" section of your Nagios XI GUI for more info).

Or create some sort of exclusion list baked into a wrapper script using check_multi:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

I can think of plenty of options that don't seem like a particularly huge lift. Alternatively, you could suggest a change to the maintainers of this plugin to add an "exclusions" list:
https://labs.consol.de/nagios/check_ora ... index.html

If this were my problem to solve, I'd just have a simple wrapper script execute check_oracle_health for all tablespaces then exclude/filter the ones I don't care about (returning Nagios check results based on the remainder). Here are the Nagios Plugin Development Guidelines if you're interested in pursuing that:
https://nagios-plugins.org/doc/guidelines.html

Re: Oracle health check tablespace utilization output

Posted: Tue Jul 31, 2018 7:24 am
by scottwilkerson
thanks @mcapra