## Config file for SQLmon nocol monitor
#
# Format:
#  POLLINTERVAL  600   (only the last one takes effect)
#  <name> <addr>  <maxseverity> <DBI driver> <username> <password> <SQL query>
#
# The first two fields are the standard sitename and siteaddr that nocol
# wants. The third is the maximum severity that the device will rise to. The
# third is the dbi driver string. The above works for mysql; others may be
# different. Note that you have to include the hostname here--the script
# doesn't try to pull it from field 1 or 2. Next two are the username and
# password to access the database. Everything from there on is the sql query
# to execute. If the query is successful it uses the return value in the
# "value" field. If not it sets that to 0 and bumps the severity. The above
# query--in case you're not dbi proficient--is selecting everything in the
# user table of the mysql database.
#
## 
POLLINTERVAL  120
#
## host  addr  maxseverity   DBI-driver   username   passwd  SQL-query ##
#
sql1  130.133.99.72 Critical dbi:mysql:mysql:localhost nocol xxyy select * from user
sql2  130.133.99.73 Error    dbi:mysql:mysql:sql2      nocol xxyy select * from user


The script will die if either the username/password doesn't work or if your
SQL is invalid.

The script itself is attached.

-- 
  _______________________________________________________________________

    Rick Beebe                                           (203) 785-6416
    Manager, Systems & Network Engineering          FAX: (203) 785-3978
    ITS-Med Client & Technology Services         Richard.Beebe@yale.edu   
    Yale University School of Medicine                                 
    P.O. Box 208078, New Haven, CT 06520-8078
  ______________________________________________________________________