postgres_monitorA 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.
Located in /monitor-defs.php (line 528)
generic_monitor | --postgres_monitor
postgres_monitor
postgres_monitor
(string $dbname, string $user, [string $password = ""], [string $host = ""], [string $port = ""])
mixed
$dbid
= false (line 533)
Database connection resource ID
mixed
$dbname
= "" (line 536)
Name of the database to connect to
mixed
$host
= "" (line 545)
For TCP connections: hostname to connect to
mixed
$password
= "" (line 542)
Password of username to connect as
mixed
$port
= "" (line 548)
For TCP connections: port to connect to
mixed
$user
= "" (line 539)
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