A monitor class to check if Postgres is up and about. You need to specify a database and a user (and if required, a password) which can be use to test-connect to Postgres. Optionally you can specify the host and port number if connection is over TCP.
NOTE: The 'monitor' class which uses this class implements a rule which says that when a monitor (such as this one) returns a FATAL condition, then the checking process will die, having sent notifications out. If you don't want this to return the COND_FATAL condition on failure use the 'set_fail_condition()' method to set it to COND_ERROR.
Located in /monitor-defs.php (line 417)
generic_monitor | --postgres_monitor
Database connection resource ID
Name of the database to connect to
For TCP connections: hostname to connect to
Password of username to connect as
For TCP connections: port to connect to
Username to connect as
Define a new Postgres monitor object.
Make the check, as to whether we can connect to the Postgres DB.
If not then return false, else return true.
Documentation generated by phpDocumentor 1.3.0RC3