Révision a0415034
postgres_queries3_: ignore internal pg_* tables, missing stuff in config
| plugins/postgresql/postgres_queries3_ | ||
|---|---|---|
| 28 | 28 |
# |
| 29 | 29 |
# Log info: |
| 30 | 30 |
# 20140701 - Initial |
| 31 |
# |
|
| 31 |
# 20140924 - |
|
| 32 |
# -ignore internal pg tables |
|
| 33 |
# -missing stuff in config |
|
| 32 | 34 |
|
| 33 | 35 |
|
| 34 | 36 |
use strict; |
| ... | ... | |
| 46 | 48 |
'inserts.value ' || SUM(n_tup_ins) || E'\n' || |
| 47 | 49 |
'updates.value ' || SUM(n_tup_upd) || E'\n' || |
| 48 | 50 |
'deletes.value ' || SUM(n_tup_del) |
| 49 |
from pg_stat_all_tables; |
|
| 51 |
from pg_stat_all_tables where relname not like 'pg_%';
|
|
| 50 | 52 |
EOF |
| 51 | 53 |
|
| 52 | 54 |
|
| ... | ... | |
| 56 | 58 |
|
| 57 | 59 |
if( defined $ARGV[0] and $ARGV[0] eq "config" ){
|
| 58 | 60 |
print qq/graph_title Postgres All Queries |
| 59 |
graph_args --base 1000 |
|
| 61 |
graph_args --base 1000 -l 0 -r
|
|
| 60 | 62 |
graph_vlabel Queries per \${graph_period}
|
| 61 | 63 |
graph_category PostgreSQL |
| 62 | 64 |
graph_info Shows number of select, insert, update and delete queries |
| ... | ... | |
| 64 | 66 |
sel_seq.info Sequential selects on all tables |
| 65 | 67 |
sel_seq.type DERIVE |
| 66 | 68 |
sel_seq.min 0 |
| 69 |
sel_seq.max 100 |
|
| 67 | 70 |
sel_seq_rows.label s_select rows |
| 68 | 71 |
sel_seq_rows.info Rows returned from sequential selects |
| 69 | 72 |
sel_seq_rows.type DERIVE |
| 70 |
sel_seq.min 0 |
|
| 73 |
sel_seq_rows.min 0 |
|
| 74 |
sel_seq_rows.max 100 |
|
| 71 | 75 |
sel_idx.label i_selects |
| 72 | 76 |
sel_idx.info Sequential selects on all indexes |
| 73 | 77 |
sel_idx.type DERIVE |
| 74 |
sel_seq.min 0 |
|
| 78 |
sel_idx.min 0 |
|
| 79 |
sel_idx.max 100 |
|
| 75 | 80 |
sel_idx_rows.label i_select rows |
| 76 | 81 |
sel_idx_rows.info Rows returned form index selects |
| 77 | 82 |
sel_idx_rows.type DERIVE |
| 78 |
sel_seq_rows.min 0 |
|
| 83 |
sel_idx_rows.min 0 |
|
| 84 |
sel_idx_rows.min 100 |
|
| 79 | 85 |
inserts.label inserts |
| 80 | 86 |
inserts.info Rows inserted on all tables |
| 81 | 87 |
inserts.type DERIVE |
| 82 | 88 |
inserts.min 0 |
| 83 |
inserts.critical 0.4:1
|
|
| 89 |
inserts.max 100
|
|
| 84 | 90 |
updates.label updates |
| 85 | 91 |
updates.info Rows updated on all tables |
| 86 | 92 |
updates.type DERIVE |
| 87 | 93 |
updates.min 0 |
| 94 |
updates.max 100 |
|
| 88 | 95 |
deletes.label deletes |
| 89 | 96 |
deletes.info Rows deleted from all tables |
| 90 | 97 |
deletes.type DERIVE |
| 91 | 98 |
deletes.min 0 |
| 99 |
deletes.max 100 |
|
| 92 | 100 |
/; |
| 93 | 101 |
exit; |
| 94 | 102 |
} |
Formats disponibles : Unified diff