pg2ch

pg2ch (PostgreSQL 2 Chart) displays useful and fancy performance charts for PostgreSQL databases.
Here is the first page shown: the Dashboard.

pg2ch - Main page

The information reported in the charts are the most important ones for managing and tuning performances on PostgreSQL. Pre-configured historical data collection and cleanup scripts are available too.

The following pages contain information about pg2ch:

USAGE

pg2ch usage is easy!

Of course You can use pg2ch after Your Web Administrator has installed it (see SETUP)...
Use Your favourite browser and navigate to the pg2ch Home Page. You will see the pg2ch page with several charts as shown above.
Tables can be sorted...

In the bottom part of the page on the left there are general informations about PostgreSQL database and on the displayed data:

pg2ch - PostgreSQL info


In the bottom part of the page on the right there are a combo box and a button:

pg2ch - Choose DB combo

Choose the desidered database and press Go button to refresh the page.

The second part of the page contains more advanced informations.

pg2ch - Advanced Statistics

ARCHITECTURE

pg2ch displays performance charts for PostgreSQL databases 8.4 or newer. Previous version statistics can be collected too, but there are much less information available.
pg2ch is a PHP web application. pg2ch requires a web server (ie Apache), PHP 4.2 (or newer) and PHP's PosgreSQL Extension.
The charts used by pg2ch are Java Script Google Charts.

pg2ch PHP program architecture is quite simple. Most important pages are:
index.php Main page: shows charts for the desidered PostgreSQL database.
config.inc.php User configuration file (eg. PosgreSQL server parameters) This file contains Database user and password: it must be adequately protected!
cron_daily.php Cron data collection. Performs data collection and statistics cleanup on enabled PosgreSQL servers. Currently used for Space Usage data collection.

pg2ch uses the tables created by pgStatsPack package and collected by crontab scripts.

DBAs configure the tool inserting in the config.inc.php file the list of servers to be accessed.

SETUP

pg2ch setup is easy!

Prerequisite: You need a web server with PHP and PHP-pgsql modules. Of course Apache on Linux is the best.

Download the software, Unzip the downloaded file and copy all its contents in your httpd data directory (eg. /var/www/html/pg2ch). This directory will be Your pg2ch Home Page (eg. http://YourServer.YourDomain/pg2ch)!
Basic setup can be easly performed copying config.inc.php.sample into config.inc.php and configuring connection parameters to Your PosgreSQL servers.

pg2ch uses pgStatsPack statistics that are collected by crontab scripts:

0,20,40 * * * * cd /var/www/html/pg2ch;php cron.php >>/var/www/html/pg2ch/cron.log 2>&1
50 23 * * * cd /var/www/html/pg2ch;php cron_daily.php >>/var/www/html/pg2ch/cron.log 2>&1

That's all! Enjoy!!!

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Pubblic License for more details.

pg2ch documentation and sources are available on: Meo's online technical documentation. Suggestions and comments are welcome!


Text: pg2ch

Date: 31 Jun 2008

Version: 0.0.2 (Alpha) - 1 Apr 2012

Author: mail@meo.bogliolo.name