Publishes statistics from PostgreSQL's pg_stat tables. Supports Postgres → Librato and Postgres → Carbon
Originally forked from postgres-librato, this project's name was changed since it now supports endpoints other than librato. Full credit goes to Torsten Becker for creating the original project.
Compatible with PostgreSQL v9.1 and greater.
Exposes the following stats:
postgres.pg_stat.backends
— gaugepostgres.pg_stat.backends_active
— gaugepostgres.pg_stat.backends_idle_in_transaction
— gaugepostgres.pg_stat.backends_idle
— gaugepostgres.pg_stat.backends_null
— gaugepostgres.pg_stat.backends_waiting
— gaugepostgres.pg_stat.block_read_time
— counterpostgres.pg_stat.cache_hits
— gaugepostgres.pg_stat.db_size
- guagepostgres.pg_stat.disk_blocks_cache_hit
— counterpostgres.pg_stat.disk_blocks_read
— counterpostgres.pg_stat.index_hits
— gaugepostgres.pg_stat.index_scans
— counterpostgres.pg_stat.locks
- gaugepostgres.pg_stat.max_query_time
— gaugepostgres.pg_stat.mean_query_time
— gaugepostgres.pg_stat.median_query_time
— gaugepostgres.pg_stat.rows_deleted
— counterpostgres.pg_stat.rows_fetched
— counterpostgres.pg_stat.rows_inserted
— counterpostgres.pg_stat.rows_returned
— counterpostgres.pg_stat.rows_updated
— counterpostgres.pg_stat.sequential_scans
— counterpostgres.pg_stat.temp_file_bytes
— counterpostgres.pg_stat.transactions_committed
— counterpostgres.pg_stat.transactions_rolled_back
— counter
1. Install the dependencies:
pip install -r requirements.txt
2. Create a config file based on sample-config.json.
3. Setup a upstart script (or something similar)
start on runlevel [2345]
stop on runlevel [016]
setuid app
setgid app
# TODO: Edit these paths:
exec python .../publish.py .../config.json
respawn