From 0a547add2f4cc264380d2dab2c472efe5a1d7094 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sat, 3 May 2014 19:17:16 +0200 Subject: 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. --- plugin/postgresql.json | 134 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 plugin/postgresql.json (limited to 'plugin/postgresql.json') 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 @@ +{ + "pg_blks": { + "title": "PostgreSQL Disk I/O ({{PI}})", + "vertical": "Blocks", + "type": "stacked", + "legend": { + "heap_hit": { + "name": "Heap hit" + }, + "heap_read": { + "name": "Heap read" + }, + "idx_hit": { + "name": "Index hit" + }, + "idx_read": { + "name": "Index read" + }, + "tidx_hit": { + "name": "Toast index hit" + }, + "tidx_read": { + "name": "Toast index read" + }, + "toast_hit": { + "name": "Toast hit" + }, + "toast_read": { + "name": "Toast read" + } + }, + "legend_format": "%5.1lf%s" + }, + "pg_db_size": { + "title": "PostgreSQL DB size ({{PI}})", + "vertical": "Bytes", + "type": "stacked", + "legend": { + "value": { + "name": "Size", + "color": "0000ff" + } + }, + "legend_format": "%5.1lf%s" + }, + "pg_n_tup_c": { + "title": "PostgreSQL Row actions ({{PI}})", + "vertical": "Rows", + "type": "stacked", + "legend": { + "ins": { + "name": "Insert", + "color": "00ff00" + }, + "upd": { + "name": "Update", + "color": "ff7c00" + }, + "hot_upd": { + "name": "Hot Update", + "color": "0000ff" + }, + "del": { + "name": "Delete", + "color": "ff0000" + } + }, + "legend_format": "%5.1lf%s" + }, + "pg_n_tup_g": { + "title": "PostgreSQL Table states ({{PI}})", + "vertical": "Rows", + "type": "stacked", + "legend": { + "live": { + "name": "Live", + "color": "00ff00" + }, + "dead": { + "name": "Dead", + "color": "ff0000" + } + }, + "legend_format": "%5.1lf%s" + }, + "pg_numbackends": { + "title": "PostgreSQL Backends ({{PI}})", + "vertical": "Backends", + "type": "stacked", + "legend": { + "value": { + "name": "Backends", + "color": "0000ff" + } + }, + "legend_format": "%5.1lf%s" + }, + "pg_scan": { + "title": "PostgreSQL Scans ({{PI}})", + "vertical": "Scans / Rows", + "type": "stacked", + "legend": { + "seq": { + "name": "Sequential" + }, + "seq_tup_read": { + "name": "Sequential rows" + }, + "idx": { + "name": "Index" + }, + "idx_tup_fetch": { + "name": "Index Rows" + } + }, + "legend_format": "%5.1lf%s" + }, + "pg_xact": { + "title": "PostgreSQL Transactions ({{PI}})", + "vertical": "Transactions", + "type": "stacked", + "legend": { + "commit": { + "name": "Commit", + "color": "00ff00" + }, + "rollback": { + "name": "Rollback", + "color": "ff0000" + } + }, + "legend_format": "%5.1lf" + } +} -- cgit v1.1