Hi,
As non Oracle man I’m trying to setup an Oracle check.
I have found quite some info and tested a lot, but I can’t seem to get it right.
Here’s the setup:
2 Oracle servers (Windows), with a database per server.
I want to check if the error table is empty. if it isn’t I want to trigger an alert, so the DB admin can act.
This is the sql statement I need to run: select count(*) from system.def$_aqerror;
I have the connectstring info. On the CentOS (Nagios) server sqlplus is installed. This all works if I connect from the command prompt with sqlplus. I then get a result of the number of records.
Now, I want to do the same with Nagios, hence with a plugin. I found and tested quite a few, but the results are not there. The one that comes most close is check_db_record_count. Only the help file on nagiosexchange and in the script are incomplete. Details about 2 variables (holiday_table and holiday_criteria) are missing, so I don’t know the syntax. if I comment out these variables I get an error “[CRITICAL] unable to locate REMEDIAL_ACTION in
query_file” This REMEDIAL_ACTION isn’t described anywhere.
I want to do something like this:
[root libexec]# ./check_oracle user/password@//server/database “select count(*) from system.def$_aqerror;” c=1
Which would mean that I get an “0” if it’s Ok, or 1 or more means Critical.
Any help would be appreciated!
Cheers,
Michael