1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

postgres_queries3_: ignore internal pg_* tables, missing stuff in config

This commit is contained in:
Samuel Smith 2014-09-24 16:05:40 -05:00
parent 4ebcba78a2
commit a04150340f

View file

@ -28,7 +28,9 @@
# #
# Log info: # Log info:
# 20140701 - Initial # 20140701 - Initial
# # 20140924 -
# -ignore internal pg tables
# -missing stuff in config
use strict; use strict;
@ -46,7 +48,7 @@ select
'inserts.value ' || SUM(n_tup_ins) || E'\n' || 'inserts.value ' || SUM(n_tup_ins) || E'\n' ||
'updates.value ' || SUM(n_tup_upd) || E'\n' || 'updates.value ' || SUM(n_tup_upd) || E'\n' ||
'deletes.value ' || SUM(n_tup_del) 'deletes.value ' || SUM(n_tup_del)
from pg_stat_all_tables; from pg_stat_all_tables where relname not like 'pg_%';
EOF EOF
@ -56,7 +58,7 @@ my @dbs = split(/-/,$1);
if( defined $ARGV[0] and $ARGV[0] eq "config" ){ if( defined $ARGV[0] and $ARGV[0] eq "config" ){
print qq/graph_title Postgres All Queries print qq/graph_title Postgres All Queries
graph_args --base 1000 graph_args --base 1000 -l 0 -r
graph_vlabel Queries per \${graph_period} graph_vlabel Queries per \${graph_period}
graph_category PostgreSQL graph_category PostgreSQL
graph_info Shows number of select, insert, update and delete queries graph_info Shows number of select, insert, update and delete queries
@ -64,31 +66,37 @@ sel_seq.label s_selects
sel_seq.info Sequential selects on all tables sel_seq.info Sequential selects on all tables
sel_seq.type DERIVE sel_seq.type DERIVE
sel_seq.min 0 sel_seq.min 0
sel_seq.max 100
sel_seq_rows.label s_select rows sel_seq_rows.label s_select rows
sel_seq_rows.info Rows returned from sequential selects sel_seq_rows.info Rows returned from sequential selects
sel_seq_rows.type DERIVE sel_seq_rows.type DERIVE
sel_seq.min 0 sel_seq_rows.min 0
sel_seq_rows.max 100
sel_idx.label i_selects sel_idx.label i_selects
sel_idx.info Sequential selects on all indexes sel_idx.info Sequential selects on all indexes
sel_idx.type DERIVE sel_idx.type DERIVE
sel_seq.min 0 sel_idx.min 0
sel_idx.max 100
sel_idx_rows.label i_select rows sel_idx_rows.label i_select rows
sel_idx_rows.info Rows returned form index selects sel_idx_rows.info Rows returned form index selects
sel_idx_rows.type DERIVE sel_idx_rows.type DERIVE
sel_seq_rows.min 0 sel_idx_rows.min 0
sel_idx_rows.min 100
inserts.label inserts inserts.label inserts
inserts.info Rows inserted on all tables inserts.info Rows inserted on all tables
inserts.type DERIVE inserts.type DERIVE
inserts.min 0 inserts.min 0
inserts.critical 0.4:1 inserts.max 100
updates.label updates updates.label updates
updates.info Rows updated on all tables updates.info Rows updated on all tables
updates.type DERIVE updates.type DERIVE
updates.min 0 updates.min 0
updates.max 100
deletes.label deletes deletes.label deletes
deletes.info Rows deleted from all tables deletes.info Rows deleted from all tables
deletes.type DERIVE deletes.type DERIVE
deletes.min 0 deletes.min 0
deletes.max 100
/; /;
exit; exit;
} }