I have a script implemented in a remote machine that checks the occupation rate of the tablespaces in Oracle (made with sqlplus). For each tablespace the script send the result with identification, service status and also performance data. For example, in Oracle I have 4 tablespaces, the script will return 4 checks results via nsca. Each check result also have performance data appended.
In Nagios side I have configured one host (oracle_machine) and one service (tablespaces_oracle). So, I’m trying to understand in how to have a graph in PNP that will gather the results sent by the nsca (One service configured to gather information about multiple tablespaces). Is it possible? For now I only can visualize a graph with information only related with check result’s tablespace that is send in last. I don’t want to configure in Nagios one service for one tablespace, because the number of tablespaces is inconstant (tests/debugs/new projects/…), that will be a tedious an unusable job!
sorry for my English… I’m trying to improve!
Thanks
Hi,
I may be able to assist a little
I am running pnp4nagios and monitoring oracle tablespaces etc.
However from the way i read your question you would like Nagios to be able to graph new tablespaces without any input from yourself?
Is that correct? If so i don’t think it is possible to achieve this… Hopefully someone can prove me wrong
I will explain how i have this working on our site.
I use the check_oracle_health plugin from http://www.consol.de/opensource/nagios/check-oracle-health/ (it is a great plugin.)
You need to have the tnsnames.ora file located in the nagios users home dir.
if you have followed the guide for PNP4Nagios on their site then you will then need to add host-pnp to your host definitions file or svr-pnp to your services. This will graph the performance data.
Note i have experienced inconsistencies with this plugin on Oracle 11g tablespace usage but is fine for 10g.
If using 11g you can still get tablespace as the plugin can submit a SQL statement
11g:
./check_oracle_health-connect=USERNAME/PASSWORD@SERVER -mode=sql --name=“SELECT (1-nvl(sum(free.bytes),0)/tot.bytes)*100 pctusd FROM (select ddf.tablespace_name, sum(ddf.bytes) bytes from dba_data_files ddf group by ddf.tablespace_name ) tot, sys.dba_free_space free where tot.tablespace_name = free.tablespace_name(+) and tot.tablespace_name = ‘TABLENAME’ group by tot.tablespace_name, tot.bytes” --name2=“Used Tablespace for TABLENAME” -critical=$ARG2$
Executing this remotely allows us to graph the performance data.
Unfortunatly you will need to add new tablespaces manually.