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/memcached.json | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 plugin/memcached.json (limited to 'plugin/memcached.json') diff --git a/plugin/memcached.json b/plugin/memcached.json new file mode 100644 index 0000000..0e7e0fd --- /dev/null +++ b/plugin/memcached.json @@ -0,0 +1,134 @@ +{ + "df": { + "title": "Memcached Memory Usage", + "vertical": "Bytes", + "type": "stacked", + "legend": { + "free": { + "name": "Free", + "color": "00ff00" + }, + "used": { + "name": "Used", + "color": "ff0000" + } + }, + "legend_format": "%5.1lf%s" + }, + "memcached_command": { + "title": "Memcached Commands", + "vertical": "Commands", + "type": "stacked", + "legend": { + "flush": { + "name": "Flush", + "color": "00e000" + }, + "get": { + "name": "Get", + "color": "0000ff" + }, + "set": { + "name": "Set", + "color": "ffb000" + } + }, + "legend_format": "%5.1lf%s" + }, + "memcached_connections": { + "title": "Memcached Number of Connections", + "vertical": "Connections", + "legend": { + "value": { + "name": "Connections", + "color": "00b000" + } + }, + "legend_format": "%5.1lf%s" + }, + "memcached_items": { + "title": "Number of Items in Memcached", + "vertical": "Items", + "legend": { + "value": { + "name": "Items", + "color": "00b000" + } + }, + "legend_format": "%5.1lf%s" + }, + "memcached_octets": { + "title": "Memcached Network Traffic", + "vertical": "{{ND}}", + "type": "io", + "legend": { + "rx": { + "name": "Receive", + "color": "0000ff" + }, + "tx": { + "name": "Transmit", + "color": "00b000" + } + }, + "legend_format": "%5.1lf%s", + "datasize": true + }, + "memcached_ops": { + "title": "Memcached Operations", + "vertical": "Commands", + "type": "stacked", + "legend": { + "evictions": { + "name": "Evictions", + "color": "00e000" + }, + "hits": { + "name": "Hits", + "color": "0000ff" + }, + "misses": { + "name": "Misses", + "color": "ffb000" + } + }, + "legend_format": "%5.1lf%s" + }, + "percent": { + "title": "Memcached Hit Ratio", + "vertical": "Percent", + "legend": { + "value": { + "name": "Percent", + "color": "00e000" + } + }, + "legend_format": "%5.1lf%s" + }, + "ps_count": { + "title": "Memcached number of Threads", + "vertical": "Threads", + "legend": { + "value": { + "name": "Threads", + "color": "00b000" + } + }, + "legend_format": "%5.1lf%s" + }, + "ps_cputime": { + "title": "CPU Time consumed by Memcached", + "vertical": "CPU Time", + "legend": { + "user": { + "name": "User", + "color": "00e000" + }, + "syst": { + "name": "System", + "color": "0000ff" + } + }, + "legend_format": "%5.1lf%s" + } +} -- cgit v1.1