This document discusses tools for monitoring PostgreSQL clusters and workloads. It introduces Open PostgreSQL Monitoring (OPM) and PostgreSQL Workload Analyzer (PoWA) as dedicated open source solutions for PostgreSQL monitoring and performance analysis. OPM relies on existing probes and components, while PoWA focuses specifically on performance and supports extensions like pg_stat_statements, pg_qualstats, and pg_stat_kcache. The document provides overviews and comparisons of these and other monitoring tools for evaluating PostgreSQL systems.
3. What already exists
Different kind of tools
Command line tools / datasources
Generic solutions with probes
Dedicated solutions
[ 3 / 37 ]
4. Command line
And data sources
Nice features
But more useful for emergency situations
Or need some external tool for best usage
[ 4 / 37 ]
5. Command line
Some examples
command line
pg_view
pg_activity
pgstats
Data source
all pg_stat* catalog
pg_stat_statements, pg_stat_plans
pg_proctab
[ 5 / 37 ]
6. Probe
Gather informations for another tool
Can sometimes be used in standalone
Some examples
check_postgres
pg_monz
[ 6 / 37 ]
8. OPM and PoWA ?
OPM
aim to be a dedicated solution
relies on existing or new probes and components
PoWA
Dedicated performance solution
[ 8 / 37 ]
9. Ecosystem
Generic solution based on probes
Name Native graphing Alerting
Nagios No Yes
Zabbix Yes Yes
Munin Yes Yes
Cacti Yes No
[ 9 / 37 ]
10. General Overview
Pros
Robust and mature
Adaptable
Extendable
Cons
UI not flexible
Data not available for querying
Except check_postgres, lack of really complete
datasource
[ 10 / 37 ]
11. Nagios
Specific
Graphing (with third part tool like OPM V2)
PostgreSQL compatibility with
check_postgres (Bucardo)
check_pg_activity (OPM)
Hard to configure
[ 11 / 37 ]
23. Ecosystem
Specific solution
Name Maintained Aim Alerting
pg_statsinfo Yes Generalist Possible
pg_watch Dead ? Generalist No
pgObserver Yes Performance No
pgCluu Yes Generalist No
PoWA Yes Performance No
[ 23 / 37 ]
24. pg_statsinfo
Pros & cons
Pros
Useful metrics
Cons
Reports on demand
Needs specific C extension (reboot required) on
each monitored server
[ 24 / 37 ]
26. pgCluu
Pros & cons
Pros
Useful metrics
General overview
Easy to use
Cons
Can be storage greedy
Need to generate reports
[ 26 / 37 ]
27. PoWA 2.0
A complete solution
Focused on performance
Handle a lot of datasource
Requires PG 9.4 or more
requires queryid exposure, since
pg_stat_statements 1.2
[ 27 / 37 ]
28. What is PoWA
PostgreSQL extension : powa-archivist
A background worker
Dedicated snapshot, aggregation and purge
functions
Dedicated UI : powa-web
[ 28 / 37 ]
31. pg_qualstats
What it allows
Find missing indexes
Which could be partial
Or on several columns if some other queries could
benefit from it
. . .
[ 31 / 37 ]
34. pg_stat_kcache
What it allows
Compute a real hit ratio (shared_buffers, system
cache and disk)
Show CPU consumption
global, per database and/or per query and/or per
user
over time
[ 34 / 37 ]
36. For the future
Nagios optional from OPM
Add ability to handle PoWA in OPM
Better use of metrics
Trending / statistic analysis
Correlate informations
Better index suggestion, global database analysis
And much more. . .
[ 36 / 37 ]