Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_odbc

Rating
2 votes
Favoured:
0
Current Version
1.20101228b1
Last Release Date
2010-12-28
Compatible With
  • Nagios 3.x
License
GPL
Hits
99339
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
check_odbc
Is no longer supported
ODBC Nagios Check Plugin

This program is free software; you can redistribute it under the GNU General Public License.
Written by Joerg Hoerter (jh at jhoerter dot com), 2010

This program is a ODBC Nagios check plugin for use with NRPE_NT.

Program:
check_odbc.exe [PREFERENCEGROUP]

-h Help
-d Debug mode (test sql and create check_odbc.ini with new preference groups)



check_db.ini
[PREFERENCEGROUP]
DB=DBNAME
LOGIN=LOGINNAME
PASSWORD=PASSWORD
SQL=SQLSTRING (f.e. select count(nr) from table where a=1)
INFOSQL=SQLSTRING (f.e. select a as Nr, b as Error from table where a=1) (Serviceoutput max 9999 lines and 9999 colums)
INFOSQLCOLUM=y (y=print Colum name)
WARN=WARNING >=count(nr) and CRIT=CRITICAL >=count(nr)

example
Serviceoutput: SQL CRITICAL - query = 2
0001 [Nr: 1 Error: Text1]
0002 [Nr: 2 Error: Text2]|'query'=1;0;1;0;0


Configuration:
==============
nagios.cfg
illegal_macro_output_chars=`~$&|" (without "<>" to get newline in serviceoutput)

NSC.ini
[NRPE_HANDLERS]
check_odbc=c:/Program Files/NSCLIENT++/check_odbc.exe [PREFERENCEGROUP]

Reviews (1)
bykordoch, October 25, 2017
The script works fine on windows, but on the Nagios server it always gives "SQL CRITICAL - can't open db *****

some help please?