Tuesday, June 30, 2015

Nagios plugin: check oracle query

Here is a Nagios plugin useful to connect to an Oracle database, perform a query and check the result by a regular expression.

Please note: it works for me, but it is far from perfect.



./check_oracle_query.sh -H -u user -w pass -p 1521 -s SID -n ID -q "select * from table" -e "^[1-9].* rows selected"

./check_oracle_query.sh -H -u user -w pass -p 1521 -s SID01 -n ID1 -q "select * from dual" -e "^X"

No comments:

Post a Comment