Index of /marco/software/postgresqlgraph/

NameLast ModifiedSizeType
Parent Directory/ -  Directory
demo/2008-Mar-13 12:16:06-  Directory
postgresqlgraph-0.1.tar.gz2008-Mar-17 12:24:3115.8Kapplication/octet-stream
Postgresqlgraph is a small tool to monitor and plot some paramaters of
a postgresql instance, such as the number of backends, the number of
blocks read from the disk and the number of tuples used. It is
able to gather data from multiple databases inside a postgresql installation.

Quick and dirty instructions:

- modify conf.yaml to suit your configuration. Warning: if you modify "STATS",
by adding or removing some items, you should delete all the rrd files.
The parameter defined can be viewed with "SELECT * from pg_stat_database" and 
"\d pg_stat_database" in whichever database you have.

- run postgres_start.rb conf.yaml, in order to verify all is ok.

- run gen_html.rb conf.yaml to generate all the html files, inside the "DIR"
configuration parameter.

- add a line in your crontab:
*/5 * * * * root  if [ -x /usr/local/postgresqlgraph/postgres_stat.rb ] && [ -r /usr/local/postgresqlgraph/conf.yaml ]; then /usr/local/postgresqlgraph/postgres_stat.rb /usr/local/postgresqlgraph/conf.yaml > /dev/null; fi

The default time step is 300s. You can change it in the cron and in the conf.yaml.

Requirements:
- postgresql (I tested it with postgresql 8.3, but it should work with 
postgresql >= 8.0)
- ruby >= 1.8
- gems: activerecord, RRDtool (gem install activerecord RubyRRDtool). For
RubyRRDtool you should have installed the rrdtool development libraries 
(apt-get install librrd2-dev under Debian)

Write me for feedbacks, patches, and suggestions: marco+site@equars.com

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, either version 3 of the License, or
    (at your option) any later version.

    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 Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

lighttpd