Installation

Install Reportlab

ReportLab is fairly easily installed; ubuntu and debian have it in their software repositories.

All other platforms, installing it is as simple as downloading the latest package from the website, http://www.reportlab.org/, unpacking it, and building it using python setup.py install.

Install RenderPM

Installing RenderPM is more involved than ReportLab.

First, you must install the PIL extensions for Python, as RenderPM relies on them for imaging support.

Second, the latest RenderPM source must be checked out of the ReportLab SVN, from http://reportlab.org/rl_addons.html

Third, the standard setup routine, python setup.py install, should be run.

Finally, you must find and locate the Adobe Base Font package. This can be found on several places on the Internet, or in the Acrobat distribution. Currently, this is unneeded, as it has been checked in to our pggraph repository under trunk/fonts

I have always had a difficult time getting RenderPM to acknowledge the existence of these fonts. As I figure out a more complete voodoo spell to get it to work, it will be posted here.

Installing pggraph2

  • your database must be created - pggraph2 was developed using the dbname of pggraph2, however, this is not hardcoded. You must also run CREATE LANGUAGE plpgsql; after you have created your database. The installer assumes that plpgsql is already an installed pl language.
  • edit the config.ini to reflect your local environment needs. All the items should be self-explanatory or documented to aid you.
  • Set up forward.py and bridge.py. Bridge.py in particular needs to be edited to have the absolute path to config.ini set, due to cron not being able to subjectively reference the location of the config file.
  • Run forward.py, if needed. It will fork() itself and initiate the SSH tunnel to the server to be queried for statistics.
  • Run install.py. It will create all the required tables, functions, indexes, and types required for pggraph2 to operate.
  • Install a cronjob to run the bridge.py script at your preferred polling interval. Pggraph was developed with 5 minutes as the shortest interval, but larger numbers can be set. Please see the config.ini comment for shortest_interval on what interval spaces pggraph2 is aware of.
  • Wait one interval
  • Mark pggraph_index.py, pggraph_database.py, and pggraph_table.py as executable.
  • Test the above scripts with your web browser. Fiddle the settings, and hit "show".

Known limitations

  • Changing the prefix in the config file AFTER the installer has been run will create serious breakage. This is due to some objects (indexes, tablenames) being hard-coded into the DB using the prefix name. Choose wisely, or be prepared to manually fix it.