[Nagiosplug-devel] Nagios SQLPlus query monitor?

Joerg Linge pitchfork at ederdrom.de
Wed Jan 13 06:37:43 CET 2010


Am 12.01.10 22:07, schrieb Litwin, Matthew:
> Hello,
> 
> Similar to the check_oracle plugin I need a nagios plugin that will SQL from say a secondary text file and then report on the lines that it results. Ideally it would return the number of lines as output where WARN and CRITICAL conditions could be checked against, but also the actual rows would be listed as perfdata. Does any plugin like this exist?
> 
> I wrote a plugin that will use sqlplus to return a line count and report on those values in Perl, but honestly my scripting capabilities are pretty weak. If you are a Perl guy and see an elegant way of doing this, any guidance on this would be very helpful.

check_oracle_health can do this.

http://labs.consol.de/lang/de/nagios/check_oracle_health/

nagios$ check_oracle_health --mode sql \
  --name 'select 200,300,1000 from dual' \
  --name2 'kaspar melchior balthasar' \
  --warning 180 --critical 500

WARNING - kaspar melchior balthasar: 200 300 1000 |
'kaspar'=200;180;500 'melchior'=300;; 'balthasar'=1000;;




More information about the Devel mailing list