Show
Ignore:
Timestamp:
12/10/2007 06:48:51 AM (13 months ago)
Author:
chris
Message:

Updated documentation & comments for the DBI directive.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • eddie/trunk/doc/manual.html

    r909 r910  
    19471947    <i>Directive Examples:</i> 
    19481948    <pre> 
     1949        # test that our postgresql server is alive and responding to requests properly 
     1950        DBI postgresql_check: 
     1951            dbtype='pg' 
     1952            host='localhost' 
     1953            database='monitoring' 
     1954            user='monitoring' 
     1955            password='sshhh' 
     1956            query='select * from monitoring' 
     1957            rule='not connected or results != 1 or result1 != 42' 
     1958            action=email(ALERT_EMAIL, 'PostgreSQL DB %(database)s failed test', 'Query: %(query)s\nConnected: %(connected)s\nError: %(errmsg)s') 
     1959         
    19491960        # alert if too many connections to the Postgres database 
    19501961        DBI db_connections: 
     
    19551966            password='sekrit' 
    19561967            query='select count(1) from pg_stat_activity' 
    1957             rule='not connected or results != 1 or result1 &gt; 40' 
     1968            rule='connected and results > 0 and result1 &gt; 40' 
    19581969            action=email('alert', 'Database %(database)s on %(h)s: too many connections (currently %(result1)s)') 
    19591970            console='%(database)s on %(host)s : connections = %(result1)d'