[collectd] [PATCH] collection.cgi: Added basic support for "postgresql" statistics.
Sebastian Harl
sh at tokkee.org
Sat Jul 5 12:06:25 CEST 2008
Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
contrib/collection.cgi | 60 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/contrib/collection.cgi b/contrib/collection.cgi
index b8a0813..cab7543 100755
--- a/contrib/collection.cgi
+++ b/contrib/collection.cgi
@@ -1953,6 +1953,66 @@ sub load_graph_definitions
'GPRINT:ping_avg:AVERAGE:%4.1lf ms Avg,',
'GPRINT:ping_max:MAX:%4.1lf ms Max,',
'GPRINT:ping_avg:LAST:%4.1lf ms Last'],
+ pg_blks => ['DEF:pg_blks_avg={file}:value:AVERAGE',
+ 'DEF:pg_blks_min={file}:value:MIN',
+ 'DEF:pg_blks_max={file}:value:MAX',
+ "AREA:pg_blks_max#$HalfBlue",
+ "AREA:pg_blks_min#$Canvas",
+ "LINE1:pg_blks_avg#$FullBlue:Blocks",
+ 'GPRINT:pg_blks_min:MIN:%4.1lf%s Min,',
+ '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_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',
+ "AREA:pg_n_tup_max#$HalfBlue",
+ "AREA:pg_n_tup_min#$Canvas",
+ "LINE1:pg_n_tup_avg#$FullBlue:Tuples",
+ 'GPRINT:pg_n_tup_min:MIN:%4.1lf%s Min,',
+ 'GPRINT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,',
+ 'GPRINT:pg_n_tup_max:MAX:%4.1lf%s Max,',
+ 'GPRINT:pg_n_tup_avg:LAST:%4.1lf%s Last'],
+ pg_n_tup_g => ['DEF:pg_n_tup_avg={file}:value:AVERAGE',
+ 'DEF:pg_n_tup_min={file}:value:MIN',
+ 'DEF:pg_n_tup_max={file}:value:MAX',
+ "AREA:pg_n_tup_max#$HalfBlue",
+ "AREA:pg_n_tup_min#$Canvas",
+ "LINE1:pg_n_tup_avg#$FullBlue:Tuples",
+ 'GPRINT:pg_n_tup_min:MIN:%4.1lf%s Min,',
+ 'GPRINT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,',
+ 'GPRINT:pg_n_tup_max:MAX:%4.1lf%s Max,',
+ 'GPRINT:pg_n_tup_avg:LAST:%4.1lf%s Last'],
+ pg_numbackends => ['DEF:pg_numbackends_avg={file}:value:AVERAGE',
+ 'DEF:pg_numbackends_min={file}:value:MIN',
+ 'DEF:pg_numbackends_max={file}:value:MAX',
+ "AREA:pg_numbackends_max#$HalfBlue",
+ "AREA:pg_numbackends_min#$Canvas",
+ "LINE1:pg_numbackends_avg#$FullBlue:Backends",
+ 'GPRINT:pg_numbackends_min:MIN:%4.1lf%s Min,',
+ 'GPRINT:pg_numbackends_avg:AVERAGE:%4.1lf%s Avg,',
+ 'GPRINT:pg_numbackends_max:MAX:%4.1lf%s Max,',
+ 'GPRINT:pg_numbackends_avg:LAST:%4.1lf%s Last'],
+ pg_scan => ['DEF:pg_scan_avg={file}:value:AVERAGE',
+ 'DEF:pg_scan_min={file}:value:MIN',
+ 'DEF:pg_scan_max={file}:value:MAX',
+ "AREA:pg_scan_max#$HalfBlue",
+ "AREA:pg_scan_min#$Canvas",
+ "LINE1:pg_scan_avg#$FullBlue:Scans",
+ 'GPRINT:pg_scan_min:MIN:%4.1lf%s Min,',
+ 'GPRINT:pg_scan_avg:AVERAGE:%4.1lf%s Avg,',
+ 'GPRINT:pg_scan_max:MAX:%4.1lf%s Max,',
+ 'GPRINT:pg_scan_avg:LAST:%4.1lf%s Last'],
+ pg_xact => ['DEF:pg_xact_avg={file}:value:AVERAGE',
+ 'DEF:pg_xact_min={file}:value:MIN',
+ 'DEF:pg_xact_max={file}:value:MAX',
+ "AREA:pg_xact_max#$HalfBlue",
+ "AREA:pg_xact_min#$Canvas",
+ "LINE1:pg_xact_avg#$FullBlue:Transactions",
+ 'GPRINT:pg_xact_min:MIN:%4.1lf%s Min,',
+ 'GPRINT:pg_xact_avg:AVERAGE:%4.1lf%s Avg,',
+ 'GPRINT:pg_xact_max:MAX:%4.1lf%s Max,',
+ 'GPRINT:pg_xact_avg:LAST:%4.1lf%s Last'],
power => ['-v', 'Watt',
'DEF:avg={file}:value:AVERAGE',
'DEF:min={file}:value:MIN',
--
1.5.6.1.156.ge903b
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080705/b092b524/attachment-0001.pgp
More information about the collectd
mailing list