postgresql plugin: Added a plugin to collect PostgreSQL database statistics.
authorSebastian Harl <sh@tokkee.org>
Sat, 5 Jul 2008 10:03:51 +0000 (12:03 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Sun, 6 Jul 2008 12:29:14 +0000 (14:29 +0200)
commita0b4b6b4dc1039670f17854b296281d3286a8e01
treec879d96bb6a238f78751aaab55b8d75f1f5facde
parent6ddbe0026dea748db40ccc494b4f5048817b346a
postgresql plugin: Added a plugin to collect PostgreSQL database statistics.

This plugin collects active server connections, transaction numbers, block IO
and table row manipulations of PostgreSQL databases. For this purpose it keeps
persistent connections to all configured databases. The statistics are
collected from PostgreSQL's "statistics collector" subsystem.

Currently, statistics are collected from the pg_stat_database,
pg_stat_user_tables and pg_statio_user_tables views. The following new types
have been introduced: pg_blks, pg_n_tup_c, pg_n_tup_g, pg_numbackends, pg_scan
and pg_xact. The type names are basically the same as the column names in the
queried views to keep things consistent. For the number of tuples, counter and
gauge values exist, so the type names have been prefixed with "_c" and "_g"
respectively.

Sample plugin configuration:

  <Plugin postgresql>
    <Database foo>
      Host "hostname"
      Port "5432"
      User "username"
      Password "secret"
      SSLMode "prefer"
      KRBSrvName "kerberos_service_name"
    </Database>
    <Database bar>
      Service "service_name"
    </Database>
  </Plugin>

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
README
configure.in
src/Makefile.am
src/collectd.conf.in
src/collectd.conf.pod
src/postgresql.c [new file with mode: 0644]
src/types.db