'GPRINT:pg_blks_avg:AVERAGE:%4.1lf%s Avg,',
'GPRINT:pg_blks_max:MAX:%4.1lf%s Max,',
'GPRINT:pg_blks_avg:LAST:%4.1lf%s Last'],
+ pg_db_size => ['DEF:pg_db_size_avg={file}:value:AVERAGE',
+ 'DEF:pg_db_size_min={file}:value:MIN',
+ 'DEF:pg_db_size_max={file}:value:MAX',
+ "AREA:pg_db_size_max#$HalfBlue",
+ "AREA:pg_db_size_min#$Canvas",
+ "LINE1:pg_db_size_avg#$FullBlue:Bytes",
+ 'GPRINT:pg_db_size_min:MIN:%4.1lf%s Min,',
+ 'GPRINT:pg_db_size_avg:AVERAGE:%4.1lf%s Avg,',
+ 'GPRINT:pg_db_size_max:MAX:%4.1lf%s Max,',
+ 'GPRINT:pg_db_size_avg:LAST:%4.1lf%s Last'],
pg_n_tup_c => ['DEF:pg_n_tup_avg={file}:value:AVERAGE',
'DEF:pg_n_tup_min={file}:value:MIN',
'DEF:pg_n_tup_max={file}:value:MAX',
This query collects disk block access counts for user tables.
+=item B<disk_usage>
+
+This query collects the on-disk size of the database in bytes.
+
=back
The B<Database> block defines one PostgreSQL database for which to collect
Specify a I<query> which should be executed for the database connection. This
may be any of the predefined or user-defined queries. If no such option is
given, it defaults to "backends", "transactions", "queries", "query_plans",
-"table_states", "disk_io". Else, the specified queries are used only.
+"table_states", "disk_io" and "disk_usage". Else, the specified queries are
+used only.
=back
nginx_requests value:COUNTER:0:134217728
percent percent:GAUGE:0:100.1
pg_blks value:COUNTER:0:U
+pg_db_size value:GAUGE:0:U
pg_n_tup_c value:COUNTER:0:U
pg_n_tup_g value:GAUGE:0:U
pg_numbackends value:GAUGE:0:U