diff options
| author | Pim van den Berg | 2014-05-03 19:17:16 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2014-05-12 21:32:24 +0200 |
| commit | 0a547add2f4cc264380d2dab2c472efe5a1d7094 (patch) | |
| tree | 55bb43a3e31c5814848d61eea92c8438e4a37886 /plugin/postgresql.json | |
| parent | type/base: set default title to "Plugin Type (PluginInstance) (Category)" (diff) | |
| download | apt-panopticon_cgp-0a547add2f4cc264380d2dab2c472efe5a1d7094.zip apt-panopticon_cgp-0a547add2f4cc264380d2dab2c472efe5a1d7094.tar.gz apt-panopticon_cgp-0a547add2f4cc264380d2dab2c472efe5a1d7094.tar.bz2 apt-panopticon_cgp-0a547add2f4cc264380d2dab2c472efe5a1d7094.tar.xz | |
graph.php: use JSON plugins instead of including PHP plugin files
A couple of big changes here. A lot of logic moved to graph.php.
The PHP plugin files have been rewritten to JSON. In these JSON files
*everything* is optional. Also *NOT* having a JSON plugin file won't
block you from having a graph. The JSON will just make the graphs
prettier (by having a title, y-axis title, legend, colors, etc..).
The Collectd types.db file is parsed and used to determine RRD content.
When things are not defined in the JSON it will fallback to a default.
Diffstat (limited to 'plugin/postgresql.json')
| -rw-r--r-- | plugin/postgresql.json | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/plugin/postgresql.json b/plugin/postgresql.json new file mode 100644 index 0000000..4e0181d --- /dev/null +++ b/plugin/postgresql.json | |||
| @@ -0,0 +1,134 @@ | |||
| 1 | { | ||
| 2 | "pg_blks": { | ||
| 3 | "title": "PostgreSQL Disk I/O ({{PI}})", | ||
| 4 | "vertical": "Blocks", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend": { | ||
| 7 | "heap_hit": { | ||
| 8 | "name": "Heap hit" | ||
| 9 | }, | ||
| 10 | "heap_read": { | ||
| 11 | "name": "Heap read" | ||
| 12 | }, | ||
| 13 | "idx_hit": { | ||
| 14 | "name": "Index hit" | ||
| 15 | }, | ||
| 16 | "idx_read": { | ||
| 17 | "name": "Index read" | ||
| 18 | }, | ||
| 19 | "tidx_hit": { | ||
| 20 | "name": "Toast index hit" | ||
| 21 | }, | ||
| 22 | "tidx_read": { | ||
| 23 | "name": "Toast index read" | ||
| 24 | }, | ||
| 25 | "toast_hit": { | ||
| 26 | "name": "Toast hit" | ||
| 27 | }, | ||
| 28 | "toast_read": { | ||
| 29 | "name": "Toast read" | ||
| 30 | } | ||
| 31 | }, | ||
| 32 | "legend_format": "%5.1lf%s" | ||
| 33 | }, | ||
| 34 | "pg_db_size": { | ||
| 35 | "title": "PostgreSQL DB size ({{PI}})", | ||
| 36 | "vertical": "Bytes", | ||
| 37 | "type": "stacked", | ||
| 38 | "legend": { | ||
| 39 | "value": { | ||
| 40 | "name": "Size", | ||
| 41 | "color": "0000ff" | ||
| 42 | } | ||
| 43 | }, | ||
| 44 | "legend_format": "%5.1lf%s" | ||
| 45 | }, | ||
| 46 | "pg_n_tup_c": { | ||
| 47 | "title": "PostgreSQL Row actions ({{PI}})", | ||
| 48 | "vertical": "Rows", | ||
| 49 | "type": "stacked", | ||
| 50 | "legend": { | ||
| 51 | "ins": { | ||
| 52 | "name": "Insert", | ||
| 53 | "color": "00ff00" | ||
| 54 | }, | ||
| 55 | "upd": { | ||
| 56 | "name": "Update", | ||
| 57 | "color": "ff7c00" | ||
| 58 | }, | ||
| 59 | "hot_upd": { | ||
| 60 | "name": "Hot Update", | ||
| 61 | "color": "0000ff" | ||
| 62 | }, | ||
| 63 | "del": { | ||
| 64 | "name": "Delete", | ||
| 65 | "color": "ff0000" | ||
| 66 | } | ||
| 67 | }, | ||
| 68 | "legend_format": "%5.1lf%s" | ||
| 69 | }, | ||
| 70 | "pg_n_tup_g": { | ||
| 71 | "title": "PostgreSQL Table states ({{PI}})", | ||
| 72 | "vertical": "Rows", | ||
| 73 | "type": "stacked", | ||
| 74 | "legend": { | ||
| 75 | "live": { | ||
| 76 | "name": "Live", | ||
| 77 | "color": "00ff00" | ||
| 78 | }, | ||
| 79 | "dead": { | ||
| 80 | "name": "Dead", | ||
| 81 | "color": "ff0000" | ||
| 82 | } | ||
| 83 | }, | ||
| 84 | "legend_format": "%5.1lf%s" | ||
| 85 | }, | ||
| 86 | "pg_numbackends": { | ||
| 87 | "title": "PostgreSQL Backends ({{PI}})", | ||
| 88 | "vertical": "Backends", | ||
| 89 | "type": "stacked", | ||
| 90 | "legend": { | ||
| 91 | "value": { | ||
| 92 | "name": "Backends", | ||
| 93 | "color": "0000ff" | ||
| 94 | } | ||
| 95 | }, | ||
| 96 | "legend_format": "%5.1lf%s" | ||
| 97 | }, | ||
| 98 | "pg_scan": { | ||
| 99 | "title": "PostgreSQL Scans ({{PI}})", | ||
| 100 | "vertical": "Scans / Rows", | ||
| 101 | "type": "stacked", | ||
| 102 | "legend": { | ||
| 103 | "seq": { | ||
| 104 | "name": "Sequential" | ||
| 105 | }, | ||
| 106 | "seq_tup_read": { | ||
| 107 | "name": "Sequential rows" | ||
| 108 | }, | ||
| 109 | "idx": { | ||
| 110 | "name": "Index" | ||
| 111 | }, | ||
| 112 | "idx_tup_fetch": { | ||
| 113 | "name": "Index Rows" | ||
| 114 | } | ||
| 115 | }, | ||
| 116 | "legend_format": "%5.1lf%s" | ||
| 117 | }, | ||
| 118 | "pg_xact": { | ||
| 119 | "title": "PostgreSQL Transactions ({{PI}})", | ||
| 120 | "vertical": "Transactions", | ||
| 121 | "type": "stacked", | ||
| 122 | "legend": { | ||
| 123 | "commit": { | ||
| 124 | "name": "Commit", | ||
| 125 | "color": "00ff00" | ||
| 126 | }, | ||
| 127 | "rollback": { | ||
| 128 | "name": "Rollback", | ||
| 129 | "color": "ff0000" | ||
| 130 | } | ||
| 131 | }, | ||
| 132 | "legend_format": "%5.1lf" | ||
| 133 | } | ||
| 134 | } | ||
