Commits

Peter Ward committed 6fb371a

Initial import.

Comments (0)

Files changed (23)

+syntax: glob
+*~
+*.py[co]
+*.swp
+data
+from collections import defaultdict
+from glob import glob
+from itertools import izip as zip
+import json
+from os.path import join, split
+from subprocess import Popen, PIPE
+
+from flask import (
+    Flask,
+    abort, current_app, jsonify, request, render_template,
+)
+
+from utils import cache_time
+
+from graphdefs import GRAPH_DEFINITIONS
+
+app = Flask(__name__)
+app.config['DATA_DIR'] = 'data'
+
+app.config['GRAPH_DEFINITIONS'] = GRAPH_DEFINITIONS
+
+def rdefaultdict():
+    return defaultdict(rdefaultdict)
+
+def rdict(d):
+    n = {}
+    for key, value in d.iteritems():
+        if isinstance(value, defaultdict):
+            value = rdict(value)
+        n[key] = value
+    return n
+
+@cache_time(60)
+def get_all_datasets():
+    data_dir = current_app.config['DATA_DIR']
+    datasets = rdefaultdict()
+
+    for filename in glob(join(data_dir, '*', '*', '*.rrd')):
+        part, dataset = split(filename)
+        dataset, _ = dataset.rsplit('.rrd', 1)
+        part, series = split(part)
+        part, host = split(part)
+        assert part == data_dir, 'might be slashes'
+        datasets[host][series][dataset] = filename
+
+    return rdict(datasets)
+
+def make_time(n):
+    if n == 0:
+        return 'now'
+    elif n < 0:
+        return 'end' + str(n)
+    return str(n)
+
+def get_rrd_data(filename, ds_type, start=-60*60, end=0, step=None):
+    definition = current_app.config['GRAPH_DEFINITIONS'][ds_type]
+
+    if step is None:
+        step = int(128 / (end - start))
+    step = max(1, step)
+    step = str(step)
+
+    start = make_time(start)
+    end = make_time(end)
+
+    # NOTE: if you find this is printing to stderr,
+    # and you need to force it to be quiet (why aren't you logging this?)
+    # then uncomment the "stderr=PIPE" line.
+    args = [
+        'rrdtool', 'xport',
+        '--json',
+        '--start', start,
+        '--end', end,
+        '--step', step,
+    ]
+    for arg in definition:
+        args.append(
+            arg.replace('{file}', filename)
+        )
+
+    p = Popen(
+        args=args,
+        stdin=PIPE,
+        stdout=PIPE,
+#        stderr=PIPE,
+    )
+    out, err = p.communicate('')
+
+    print out
+
+    # BUG: rrdtool xport doesn't return proper JSON.
+    # we attempt to fix it up here (ugh!)
+    out = out.replace("'", '"')
+    import re
+    out = re.sub(' ([^ ]*?):', r' "\1":', out)
+
+    data = json.loads(out)
+
+    start = data['meta']['start']
+    end = data['meta']['end']
+    step = data['meta']['step']
+
+    # we then return per-series information
+    series = {}
+
+    for sname, sdata in zip(
+        data['meta']['legend'],
+        zip(*data['data'])
+    ):
+        when = start
+        series[sname] = ssdata = []
+        for value in sdata:
+            if value is not None:
+                ssdata.append([when * 1000, value])
+            when += step
+
+    return series
+
+@app.route('/')
+def show_all():
+    all_datasets = get_all_datasets()
+    return render_template(
+        'index.html',
+        all_datasets=all_datasets,
+    )
+
+@app.route('/<hostname>')
+def show_host(hostname):
+    all_datasets = get_all_datasets()
+    if hostname not in all_datasets:
+        abort(404)
+    host = all_datasets[hostname]
+
+    return render_template(
+        'host.html',
+        all_datasets=all_datasets,
+        hostname=hostname,
+        host=host,
+    )
+
+@app.route('/<hostname>/<series>')
+def show_series(hostname, series):
+    all_datasets = get_all_datasets()
+    if hostname not in all_datasets:
+        abort(404)
+    host = all_datasets[hostname]
+    if series not in host:
+        abort(404)
+
+    datasets = {}
+    for name, filename in host[series].items():
+        ds_type = name.split('-', 1)[0]
+        datasets[name] = get_rrd_data(filename, ds_type)
+
+    return render_template(
+        'series.html',
+        all_datasets=all_datasets,
+        hostname=hostname,
+        series=series,
+        datasets=datasets,
+    )
+
+@app.route('/<hostname>/<series>/<dataset>.json')
+def get_dataset(hostname, series, dataset):
+    all_datasets = get_all_datasets()
+    if hostname not in all_datasets:
+        abort(404)
+    host = all_datasets[hostname]
+    if series not in host:
+        abort(404)
+    datasets = host[series]
+    if dataset not in datasets:
+        abort(404)
+    filename = datasets[dataset]
+
+    step = None
+    if 'step' in request.args:
+        step = int(request.args['step'])
+
+    start = request.args.get('start', -60*60)
+    start = int(start)
+    end = request.args.get('end', 0)
+    end = int(end)
+
+    ds_type = dataset.split('-', 1)[0]
+    return jsonify(
+        get_rrd_data(
+            filename, ds_type,
+            start, end, step,
+        )
+    )
+
+if __name__ == '__main__':
+    app.run(debug=True)
+GRAPH_DEFINITIONS = {
+    "apache_bytes": [
+        "DEF:min_raw={file}:count:MIN",
+        "DEF:avg_raw={file}:count:AVERAGE",
+        "DEF:max_raw={file}:count:MAX",
+        "CDEF:min=min_raw,8,*",
+        "CDEF:avg=avg_raw,8,*",
+        "CDEF:max=max_raw,8,*",
+        "CDEF:mytime=avg_raw,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:avg_sample=avg_raw,UN,0,avg_raw,IF,sample_len,*",
+        "CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+",
+        "XPORT:min:MIN:%5.1lf%s Min,",
+        "XPORT:avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:max:MAX:%5.1lf%s Max,",
+        "XPORT:avg:LAST:%5.1lf%s Last",
+        "XPORT:avg_sum:LAST:(ca. %5.1lf%sB Total)\\l"
+    ],
+    "apache_connections": [
+        "DEF:min={file}:count:MIN",
+        "DEF:avg={file}:count:AVERAGE",
+        "DEF:max={file}:count:MAX",
+        "XPORT:min:MIN:%6.2lf Min,",
+        "XPORT:avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:max:MAX:%6.2lf Max,",
+        "XPORT:avg:LAST:%6.2lf Last"
+    ],
+    "apache_idle_workers": [
+        "DEF:min={file}:count:MIN",
+        "DEF:avg={file}:count:AVERAGE",
+        "DEF:max={file}:count:MAX",
+        "XPORT:min:MIN:%6.2lf Min,",
+        "XPORT:avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:max:MAX:%6.2lf Max,",
+        "XPORT:avg:LAST:%6.2lf Last"
+    ],
+    "apache_requests": [
+        "DEF:min={file}:count:MIN",   
+        "DEF:avg={file}:count:AVERAGE",
+        "DEF:max={file}:count:MAX",   
+        "XPORT:min:MIN:%6.2lf Min,", 
+        "XPORT:avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:max:MAX:%6.2lf Max,", 
+        "XPORT:avg:LAST:%6.2lf Last"
+    ],
+    "connections": [
+        "DEF:min={file}:value:MIN",   
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:max={file}:value:MAX",   
+        "XPORT:min:MIN:%6.2lf Min,", 
+        "XPORT:avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:max:MAX:%6.2lf Max,",
+        "XPORT:avg:LAST:%6.2lf Last"
+    ],
+    "cache_result": [
+        "DEF:min={file}:value:MIN",
+        "DEF:avg={file}:value:AVERAGE",
+        "XPORT:min:MIN:%6.2lf Min,",
+        "XPORT:avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:max:MAX:%6.2lf Max,",
+        "XPORT:avg:LAST:%6.2lf Last"
+    ],
+    "apache_scoreboard": [
+        "DEF:min={file}:count:MIN",   
+        "DEF:avg={file}:count:AVERAGE",
+        "DEF:max={file}:count:MAX",   
+        "XPORT:min:MIN:%6.2lf Min,",
+        "XPORT:avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:max:MAX:%6.2lf Max,",
+        "XPORT:avg:LAST:%6.2lf Last"
+    ],
+    "bitrate": [
+        "Bits/s",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%5.1lf%s Min,",
+        "XPORT:avg:AVERAGE:%5.1lf%s Average,",
+        "XPORT:max:MAX:%5.1lf%s Max,",
+        "XPORT:avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "charge": [
+        "DEF:avg={file}:value:MIN",
+        "XPORT:avg:Ah",
+    ],
+    "contextswitch": [
+        "DEF:avg={file}:contextswitches:AVERAGE",
+        "DEF:min={file}:contextswitches:MIN",
+        "DEF:max={file}:contextswitches:MAX",
+        "XPORT:min:MIN:%4.1lf ms Min,",
+        "XPORT:avg:AVERAGE:%4.1lf ms Avg,",
+        "XPORT:max:MAX:%4.1lf ms Max,",
+        "XPORT:avg:LAST:%4.1lf ms Last"
+    ],
+    "cpu": [
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:min",
+        "XPORT:avg:average",
+        "XPORT:max:max"
+    ],
+    "current": [
+        "Ampere",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%5.1lf%sA Min,",
+        "XPORT:avg:AVERAGE:%5.1lf%sA Avg,",
+        "XPORT:max:MAX:%5.1lf%sA Max,",
+        "XPORT:avg:LAST:%5.1lf%sA Last\\l"
+    ],
+    "counter": [
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%4.1lf Min,",
+        "XPORT:avg:AVERAGE:%4.1lf Avg,",
+        "XPORT:max:MAX:%4.1lf Max,",
+        "XPORT:avg:LAST:%4.1lf Last\\l"
+    ],
+    "derive": [
+        "Derive",
+        "DEF:min={file}:value:MIN",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:max={file}:value:MAX",
+        "CDEF:mytime=avg,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:avg_sample=avg,UN,0,avg,IF,sample_len,*",
+        "CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+",
+        "XPORT:avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:max:MAX:%5.1lf%s Max,",
+        "XPORT:avg:LAST:%5.1lf%s Last",
+        "XPORT:avg_sum:LAST:(ca. %5.1lf%s Total)\\l"
+    ],
+    "df": [
+        "Percent",
+        "-l",
+        "0",
+        "DEF:free_avg={file}:free:AVERAGE",
+        "DEF:free_min={file}:free:MIN",
+        "DEF:free_max={file}:free:MAX",
+        "DEF:used_avg={file}:used:AVERAGE",
+        "DEF:used_min={file}:used:MIN",
+        "DEF:used_max={file}:used:MAX",
+        "CDEF:total=free_avg,used_avg,+",
+        "CDEF:free_pct=100,free_avg,*,total,/",
+        "CDEF:used_pct=100,used_avg,*,total,/",
+        "CDEF:free_acc=free_pct,used_pct,+",
+        "CDEF:used_acc=used_pct",
+        "XPORT:free_min:MIN:%5.1lf%sB Min,",
+        "XPORT:free_avg:AVERAGE:%5.1lf%sB Avg,",
+        "XPORT:free_max:MAX:%5.1lf%sB Max,",
+        "XPORT:free_avg:LAST:%5.1lf%sB Last\\l",
+        "XPORT:used_min:MIN:%5.1lf%sB Min,",
+        "XPORT:used_avg:AVERAGE:%5.1lf%sB Avg,",
+        "XPORT:used_max:MAX:%5.1lf%sB Max,",
+        "XPORT:used_avg:LAST:%5.1lf%sB Last\\l"
+    ],
+    "disk": [
+        "DEF:rtime_avg={file}:rtime:AVERAGE",
+        "DEF:rtime_min={file}:rtime:MIN",
+        "DEF:rtime_max={file}:rtime:MAX",
+        "DEF:wtime_avg={file}:wtime:AVERAGE",
+        "DEF:wtime_min={file}:wtime:MIN",
+        "DEF:wtime_max={file}:wtime:MAX",
+        "CDEF:rtime_avg_ms=rtime_avg,1000,/",
+        "CDEF:rtime_min_ms=rtime_min,1000,/",
+        "CDEF:rtime_max_ms=rtime_max,1000,/",
+        "CDEF:wtime_avg_ms=wtime_avg,1000,/",
+        "CDEF:wtime_min_ms=wtime_min,1000,/",
+        "CDEF:wtime_max_ms=wtime_max,1000,/",
+        "CDEF:total_avg_ms=rtime_avg_ms,wtime_avg_ms,+",
+        "CDEF:total_min_ms=rtime_min_ms,wtime_min_ms,+",
+        "CDEF:total_max_ms=rtime_max_ms,wtime_max_ms,+",
+        "XPORT:wtime_min_ms:MIN:%5.1lf%s Min,",
+        "XPORT:wtime_avg_ms:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:wtime_max_ms:MAX:%5.1lf%s Max,",
+        "XPORT:wtime_avg_ms:LAST:%5.1lf%s Last\n",
+        "XPORT:rtime_min_ms:MIN:%5.1lf%s Min,",
+        "XPORT:rtime_avg_ms:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:rtime_max_ms:MAX:%5.1lf%s Max,",
+        "XPORT:rtime_avg_ms:LAST:%5.1lf%s Last\n",
+        "XPORT:total_min_ms:MIN:%5.1lf%s Min,",
+        "XPORT:total_avg_ms:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:total_max_ms:MAX:%5.1lf%s Max,",
+        "XPORT:total_avg_ms:LAST:%5.1lf%s Last"
+    ],
+    "disk_octets": [
+        "Bytes/s",
+        "DEF:out_min={file}:write:MIN",
+        "DEF:out_avg={file}:write:AVERAGE",
+        "DEF:out_max={file}:write:MAX",
+        "DEF:inc_min={file}:read:MIN",
+        "DEF:inc_avg={file}:read:AVERAGE",
+        "DEF:inc_max={file}:read:MAX",
+        "CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF",
+        "CDEF:mytime=out_avg,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*",
+        "CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+",
+        "CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*",
+        "CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+",
+        "XPORT:out_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:out_max:MAX:%5.1lf%s Max,",
+        "XPORT:out_avg:LAST:%5.1lf%s Last",
+        "XPORT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l",
+        "XPORT:inc_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:inc_max:MAX:%5.1lf%s Max,",
+        "XPORT:inc_avg:LAST:%5.1lf%s Last",
+        "XPORT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l"
+    ],
+    "disk_merged": [
+        "Merged Ops/s",
+        "DEF:out_min={file}:write:MIN",
+        "DEF:out_avg={file}:write:AVERAGE",
+        "DEF:out_max={file}:write:MAX",
+        "DEF:inc_min={file}:read:MIN",
+        "DEF:inc_avg={file}:read:AVERAGE",
+        "DEF:inc_max={file}:read:MAX",
+        "CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF",
+        "XPORT:out_avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:out_max:MAX:%6.2lf Max,",
+        "XPORT:out_avg:LAST:%6.2lf Last\\l",
+        "XPORT:inc_avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:inc_max:MAX:%6.2lf Max,",
+        "XPORT:inc_avg:LAST:%6.2lf Last\\l"
+    ],
+    "disk_ops": [
+        "Ops/s",
+        "DEF:out_min={file}:write:MIN",
+        "DEF:out_avg={file}:write:AVERAGE",
+        "DEF:out_max={file}:write:MAX",
+        "DEF:inc_min={file}:read:MIN",
+        "DEF:inc_avg={file}:read:AVERAGE",
+        "DEF:inc_max={file}:read:MAX",
+        "CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF",
+        "XPORT:out_avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:out_max:MAX:%6.2lf Max,",
+        "XPORT:out_avg:LAST:%6.2lf Last\\l",
+        "XPORT:inc_avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:inc_max:MAX:%6.2lf Max,",
+        "XPORT:inc_avg:LAST:%6.2lf Last\\l"
+    ],
+    "disk_time": [
+        "Seconds/s",
+        "DEF:out_min_raw={file}:write:MIN",
+        "DEF:out_avg_raw={file}:write:AVERAGE",
+        "DEF:out_max_raw={file}:write:MAX",
+        "DEF:inc_min_raw={file}:read:MIN",
+        "DEF:inc_avg_raw={file}:read:AVERAGE",
+        "DEF:inc_max_raw={file}:read:MAX",
+        "CDEF:out_min=out_min_raw,1000,/",
+        "CDEF:out_avg=out_avg_raw,1000,/",
+        "CDEF:out_max=out_max_raw,1000,/",
+        "CDEF:inc_min=inc_min_raw,1000,/",
+        "CDEF:inc_avg=inc_avg_raw,1000,/",
+        "CDEF:inc_max=inc_max_raw,1000,/",
+        "CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF",
+        "XPORT:out_avg:AVERAGE:%5.1lf%ss Avg,",
+        "XPORT:out_max:MAX:%5.1lf%ss Max,",
+        "XPORT:out_avg:LAST:%5.1lf%ss Last\\l",
+        "XPORT:inc_avg:AVERAGE:%5.1lf%ss Avg,",
+        "XPORT:inc_max:MAX:%5.1lf%ss Max,",
+        "XPORT:inc_avg:LAST:%5.1lf%ss Last\\l"
+    ],
+    "dns_traffic": [
+        "DEF:rsp_min_raw={file}:responses:MIN",
+        "DEF:rsp_avg_raw={file}:responses:AVERAGE",
+        "DEF:rsp_max_raw={file}:responses:MAX",
+        "DEF:qry_min_raw={file}:queries:MIN",
+        "DEF:qry_avg_raw={file}:queries:AVERAGE",
+        "DEF:qry_max_raw={file}:queries:MAX",
+        "CDEF:rsp_min=rsp_min_raw,8,*",
+        "CDEF:rsp_avg=rsp_avg_raw,8,*",
+        "CDEF:rsp_max=rsp_max_raw,8,*",
+        "CDEF:qry_min=qry_min_raw,8,*",
+        "CDEF:qry_avg=qry_avg_raw,8,*",
+        "CDEF:qry_max=qry_max_raw,8,*",
+        "CDEF:overlap=rsp_avg,qry_avg,GT,qry_avg,rsp_avg,IF",
+        "CDEF:mytime=rsp_avg_raw,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:rsp_avg_sample=rsp_avg_raw,UN,0,rsp_avg_raw,IF,sample_len,*",
+        "CDEF:rsp_avg_sum=PREV,UN,0,PREV,IF,rsp_avg_sample,+",
+        "CDEF:qry_avg_sample=qry_avg_raw,UN,0,qry_avg_raw,IF,sample_len,*",
+        "CDEF:qry_avg_sum=PREV,UN,0,PREV,IF,qry_avg_sample,+",
+        "XPORT:rsp_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:rsp_max:MAX:%5.1lf%s Max,",
+        "XPORT:rsp_avg:LAST:%5.1lf%s Last",
+        "XPORT:rsp_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l",
+        "XPORT:qry_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:qry_max:MAX:%5.1lf%s Max,",
+        "XPORT:qry_avg:LAST:%5.1lf%s Last",
+        "XPORT:qry_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l"
+    ],
+
+    "dns_octets": [
+        "DEF:rsp_min_raw={file}:responses:MIN",
+        "DEF:rsp_avg_raw={file}:responses:AVERAGE",
+        "DEF:rsp_max_raw={file}:responses:MAX",
+        "DEF:qry_min_raw={file}:queries:MIN",
+        "DEF:qry_avg_raw={file}:queries:AVERAGE",
+        "DEF:qry_max_raw={file}:queries:MAX",
+        "CDEF:rsp_min=rsp_min_raw,8,*",
+        "CDEF:rsp_avg=rsp_avg_raw,8,*",
+        "CDEF:rsp_max=rsp_max_raw,8,*",
+        "CDEF:qry_min=qry_min_raw,8,*",
+        "CDEF:qry_avg=qry_avg_raw,8,*",
+        "CDEF:qry_max=qry_max_raw,8,*",
+        "CDEF:overlap=rsp_avg,qry_avg,GT,qry_avg,rsp_avg,IF",
+        "CDEF:mytime=rsp_avg_raw,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:rsp_avg_sample=rsp_avg_raw,UN,0,rsp_avg_raw,IF,sample_len,*",
+        "CDEF:rsp_avg_sum=PREV,UN,0,PREV,IF,rsp_avg_sample,+",
+        "CDEF:qry_avg_sample=qry_avg_raw,UN,0,qry_avg_raw,IF,sample_len,*",
+        "CDEF:qry_avg_sum=PREV,UN,0,PREV,IF,qry_avg_sample,+",
+        "XPORT:rsp_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:rsp_max:MAX:%5.1lf%s Max,",
+        "XPORT:rsp_avg:LAST:%5.1lf%s Last",
+        "XPORT:rsp_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l",
+        "XPORT:qry_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:qry_max:MAX:%5.1lf%s Max,",
+        "XPORT:qry_avg:LAST:%5.1lf%s Last",
+        "XPORT:qry_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l"
+    ],
+    "dns_opcode": [
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%9.3lf Min,",
+        "XPORT:avg:AVERAGE:%9.3lf Average,",
+        "XPORT:max:MAX:%9.3lf Max,",
+        "XPORT:avg:LAST:%9.3lf Last\\l"
+    ],
+    "email_count": [
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "XPORT:min:MIN:%4.1lf Min,",
+        "XPORT:avg:AVERAGE:%4.1lf Avg,",
+        "XPORT:max:MAX:%4.1lf Max,",
+        "XPORT:avg:LAST:%4.1lf Last\\l"
+    ],
+    "email_size": [
+        "Bytes",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "XPORT:min:MIN:%4.1lf Min,",
+        "XPORT:avg:AVERAGE:%4.1lf Avg,",
+        "XPORT:max:MAX:%4.1lf Max,",
+        "XPORT:avg:LAST:%4.1lf Last\\l"
+    ],
+    "fork_rate": [
+        "Forks/s",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%5.1lf%s Min,",
+        "XPORT:avg:AVERAGE:%5.1lf%s Average,",
+        "XPORT:max:MAX:%5.1lf%s Max,",
+        "XPORT:avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "spam_score": [
+        "Score",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "XPORT:min:MIN:%4.1lf Min,",
+        "XPORT:avg:AVERAGE:%4.1lf Avg,",
+        "XPORT:max:MAX:%4.1lf Max,",
+        "XPORT:avg:LAST:%4.1lf Last\\l"
+    ],
+    "spam_check": [
+        "DEF:avg={file}:hits:AVERAGE",
+        "DEF:min={file}:hits:MIN",
+        "XPORT:min:MIN:%4.1lf Min,",
+        "XPORT:avg:AVERAGE:%4.1lf Avg,",
+        "XPORT:max:MAX:%4.1lf Max,",
+        "XPORT:avg:LAST:%4.1lf Last\\l"
+    ],
+    "entropy": [
+        "Bits",
+        "DEF:avg={file}:entropy:AVERAGE",
+        "DEF:min={file}:entropy:MIN",
+        "DEF:max={file}:entropy:MAX",
+        "XPORT:min:MIN:%4.0lfbit Min,",
+        "XPORT:avg:AVERAGE:%4.0lfbit Avg,",
+        "XPORT:max:MAX:%4.0lfbit Max,",
+        "XPORT:avg:LAST:%4.0lfbit Last\\l"
+    ],
+    "fanspeed": [
+        "RPM",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "XPORT:min:MIN:%4.1lf Min,",
+        "XPORT:avg:AVERAGE:%4.1lf Avg,",
+        "XPORT:max:MAX:%4.1lf Max,",
+        "XPORT:avg:LAST:%4.1lf Last\\l"
+    ],
+    "frequency": [
+        "DEF:avg={file}:frequency:AVERAGE",
+        "XPORT:avg:Hertz",
+    ],
+    "frequency_offset": [
+        "DEF:ppm_avg={file}:ppm:AVERAGE",
+        "DEF:ppm_min={file}:ppm:MIN",
+        "DEF:ppm_max={file}:ppm:MAX",
+        "XPORT:ppm_min:MIN:%5.2lf Min,",
+        "XPORT:ppm_avg:AVERAGE:%5.2lf Avg,",
+        "XPORT:ppm_max:MAX:%5.2lf Max,",
+        "XPORT:ppm_avg:LAST:%5.2lf Last"
+    ],
+    "gauge": [
+        "Exec value",
+        "DEF:temp_avg={file}:value:AVERAGE",
+        "DEF:temp_min={file}:value:MIN",
+        "DEF:temp_max={file}:value:MAX",
+        "XPORT:temp_min:MIN:%6.2lf Min,",
+        "XPORT:temp_avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:temp_max:MAX:%6.2lf Max,",
+        "XPORT:temp_avg:LAST:%6.2lf Last\\l"
+    ],
+    "hddtemp": [
+        "DEF:temp_avg={file}:value:AVERAGE",
+        "DEF:temp_min={file}:value:MIN",
+        "DEF:temp_max={file}:value:MAX",
+        "XPORT:temp_min:MIN:%4.1lf Min,",
+        "XPORT:temp_avg:AVERAGE:%4.1lf Avg,",
+        "XPORT:temp_max:MAX:%4.1lf Max,",
+        "XPORT:temp_avg:LAST:%4.1lf Last\\l"
+    ],
+    "humidity": [
+        "Percent",
+        "DEF:temp_avg={file}:value:AVERAGE",
+        "DEF:temp_min={file}:value:MIN",
+        "DEF:temp_max={file}:value:MAX",
+        "XPORT:temp_min:MIN:%4.1lf%% Min,",
+        "XPORT:temp_avg:AVERAGE:%4.1lf%% Avg,",
+        "XPORT:temp_max:MAX:%4.1lf%% Max,",
+        "XPORT:temp_avg:LAST:%4.1lf%% Last\\l"
+    ],
+    "if_errors": [
+        "-v", "Errors/s",
+        "DEF:tx_min={file}:tx:MIN",
+        "DEF:tx_avg={file}:tx:AVERAGE",
+        "DEF:tx_max={file}:tx:MAX",
+        "DEF:rx_min={file}:rx:MIN",
+        "DEF:rx_avg={file}:rx:AVERAGE",
+        "DEF:rx_max={file}:rx:MAX",
+        "CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF",
+        "CDEF:mytime=tx_avg,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*",
+        "CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+",
+        "CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*",
+        "CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+",
+        "XPORT:tx_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:tx_max:MAX:%5.1lf%s Max,",
+        "XPORT:tx_avg:LAST:%5.1lf%s Last",
+        "XPORT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\\l",
+        "XPORT:rx_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:rx_max:MAX:%5.1lf%s Max,",
+        "XPORT:rx_avg:LAST:%5.1lf%s Last",
+        "XPORT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\\l"
+    ],
+    "if_collisions": [
+        "Collisions/s",
+        "DEF:min_raw={file}:value:MIN",
+        "DEF:avg_raw={file}:value:AVERAGE",
+        "DEF:max_raw={file}:value:MAX",
+        "CDEF:min=min_raw,8,*",
+        "CDEF:avg=avg_raw,8,*",
+        "CDEF:max=max_raw,8,*",
+        "XPORT:min:MIN:%5.1lf %s Min,",
+        "XPORT:avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:max:MAX:%5.1lf%s Max,",
+        "XPORT:avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "if_dropped": [
+        "-v", "Packets/s",
+        "DEF:tx_min={file}:tx:MIN",
+        "DEF:tx_avg={file}:tx:AVERAGE",
+        "DEF:tx_max={file}:tx:MAX",
+        "DEF:rx_min={file}:rx:MIN",
+        "DEF:rx_avg={file}:rx:AVERAGE",
+        "DEF:rx_max={file}:rx:MAX",
+        "CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF",
+        "CDEF:mytime=tx_avg,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*",
+        "CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+",
+        "CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*",
+        "CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+",
+        "XPORT:tx_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:tx_max:MAX:%5.1lf%s Max,",
+        "XPORT:tx_avg:LAST:%5.1lf%s Last",
+        "XPORT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\\l",
+        "XPORT:rx_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:rx_max:MAX:%5.1lf%s Max,",
+        "XPORT:rx_avg:LAST:%5.1lf%s Last",
+        "XPORT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\\l"
+    ],
+    "if_packets": [
+        "-v", "Packets/s",
+        "DEF:tx_min={file}:tx:MIN",
+        "DEF:tx_avg={file}:tx:AVERAGE",
+        "DEF:tx_max={file}:tx:MAX",
+        "DEF:rx_min={file}:rx:MIN",
+        "DEF:rx_avg={file}:rx:AVERAGE",
+        "DEF:rx_max={file}:rx:MAX",
+        "CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF",
+        "CDEF:mytime=tx_avg,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*",
+        "CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+",
+        "CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*",
+        "CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+",
+        "XPORT:tx_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:tx_max:MAX:%5.1lf%s Max,",
+        "XPORT:tx_avg:LAST:%5.1lf%s Last",
+        "XPORT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\\l",
+        "XPORT:rx_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:rx_max:MAX:%5.1lf%s Max,",
+        "XPORT:rx_avg:LAST:%5.1lf%s Last",
+        "XPORT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\\l"
+    ],
+    "if_rx_errors": [
+        "Errors/s",
+        "DEF:min={file}:value:MIN",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:max={file}:value:MAX",
+        "CDEF:mytime=avg,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:avg_sample=avg,UN,0,avg,IF,sample_len,*",
+        "CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+",
+        "XPORT:avg:AVERAGE:%3.1lf%s Avg,",
+        "XPORT:max:MAX:%3.1lf%s Max,",
+        "XPORT:avg:LAST:%3.1lf%s Last",
+        "XPORT:avg_sum:LAST:(ca. %2.0lf%s Total)\\l"
+    ],
+    "ipt_bytes": [
+        "-v", "Bits/s",
+        "DEF:min_raw={file}:value:MIN",
+        "DEF:avg_raw={file}:value:AVERAGE",
+        "DEF:max_raw={file}:value:MAX",
+        "CDEF:min=min_raw,8,*",
+        "CDEF:avg=avg_raw,8,*",
+        "CDEF:max=max_raw,8,*",
+        "CDEF:mytime=avg_raw,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:avg_sample=avg_raw,UN,0,avg_raw,IF,sample_len,*",
+        "CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+",
+        "XPORT:avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:max:MAX:%5.1lf%s Max,",
+        "XPORT:avg:LAST:%5.1lf%s Last",
+        "XPORT:avg_sum:LAST:(ca. %5.1lf%sB Total)\\l"
+    ],
+    "ipt_packets": [
+        "Packets/s",
+        "DEF:min={file}:value:MIN",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%5.1lf %s Min,",
+        "XPORT:avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:max:MAX:%5.1lf%s Max,",
+        "XPORT:avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "irq": [
+        "-v",                           "Issues/s",
+        "DEF:avg={file}:value:AVERAGE", "DEF:min={file}:value:MIN",
+        "XPORT:min:MIN:%6.2lf Min,",   "XPORT:avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:max:MAX:%6.2lf Max,",   "XPORT:avg:LAST:%6.2lf Last\\l"
+    ],
+    "lighttpd": [
+       "DEF:binraw={file}:InOctets:AVERAGE",
+       "DEF:binmaxraw={file}:InOctets:MAX",
+       "DEF:binminraw={file}:InOctets:MIN",
+       "DEF:bout={file}:OutOctets:AVERAGE",
+       "DEF:boutmax={file}:OutOctets:MAX",
+       "DEF:boutmin={file}:OutOctets:MIN",
+       "CDEF:bin=binraw,-1,*",
+       "CDEF:binmax=binmaxraw,-1,*",
+       "CDEF:binmin=binminraw,-1,*",
+       "CDEF:binminmax=binmaxraw,binminraw,-",
+       "CDEF:boutminmax=boutmax,boutmin,-",
+       "STACK:binmax#f00000:",
+       "LINE2:bin#efb71d:incoming",
+       "XPORT:bin:MIN:%.2lf",
+       "XPORT:bin:AVERAGE:%.2lf",
+       "XPORT:bin:MAX:%.2lf",
+       "STACK:boutminmax#00f000:",
+       "LINE2:bout#a0a735:outgoing",
+       "XPORT:bout:MIN:%.2lf",
+       "XPORT:bout:AVERAGE:%.2lf",
+       "XPORT:bout:MAX:%.2lf"
+   ],
+   "load": [
+        "DEF:s_avg={file}:shortterm:AVERAGE",
+        "DEF:m_avg={file}:midterm:AVERAGE",
+        "DEF:l_avg={file}:longterm:AVERAGE",
+        "XPORT:s_avg:shortterm",
+        "XPORT:m_avg:midterm",
+        "XPORT:l_avg:longterm",
+    ],
+    "load_percent": [
+        "DEF:avg={file}:percent:AVERAGE",
+        "DEF:min={file}:percent:MIN",
+        "DEF:max={file}:percent:MAX",
+        "XPORT:min:MIN:%5.1lf%s%% Min,",
+        "XPORT:avg:AVERAGE:%5.1lf%s%% Avg,",
+        "XPORT:max:MAX:%5.1lf%s%% Max,",
+        "XPORT:avg:LAST:%5.1lf%s%% Last\\l"
+    ],
+    "mails": [
+        "DEF:rawgood={file}:good:AVERAGE",
+        "DEF:rawspam={file}:spam:AVERAGE",
+        "CDEF:good=rawgood,UN,0,rawgood,IF",
+        "CDEF:spam=rawspam,UN,0,rawspam,IF",
+        "CDEF:negspam=spam,-1,*",
+        "XPORT:good:AVERAGE:%4.1lf Avg,",
+        "XPORT:good:MAX:%4.1lf Max,",
+        "XPORT:good:LAST:%4.1lf Last\n",
+        "XPORT:spam:AVERAGE:%4.1lf Avg,",
+        "XPORT:spam:MAX:%4.1lf Max,",
+        "XPORT:spam:LAST:%4.1lf Last",
+        "HRULE:0#000000"
+    ],
+    "memory": [
+        "-b",
+        "1024",
+        "Bytes",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%5.1lf%sbyte Min,",
+        "XPORT:avg:AVERAGE:%5.1lf%sbyte Avg,",
+        "XPORT:max:MAX:%5.1lf%sbyte Max,",
+        "XPORT:avg:LAST:%5.1lf%sbyte Last\\l"
+    ],
+    "old_memory": [
+        "DEF:used_avg={file}:used:AVERAGE",
+        "DEF:free_avg={file}:free:AVERAGE",
+        "DEF:buffers_avg={file}:buffers:AVERAGE",
+        "DEF:cached_avg={file}:cached:AVERAGE",
+        "DEF:used_min={file}:used:MIN",
+        "DEF:free_min={file}:free:MIN",
+        "DEF:buffers_min={file}:buffers:MIN",
+        "DEF:cached_min={file}:cached:MIN",
+        "DEF:used_max={file}:used:MAX",
+        "DEF:free_max={file}:free:MAX",
+        "DEF:buffers_max={file}:buffers:MAX",
+        "DEF:cached_max={file}:cached:MAX",
+        "CDEF:cached_avg_nn=cached_avg,UN,0,cached_avg,IF",
+        "CDEF:buffers_avg_nn=buffers_avg,UN,0,buffers_avg,IF",
+        "CDEF:free_cached_buffers_used=free_avg,cached_avg_nn,+,buffers_avg_nn,+,used_avg,+",
+        "CDEF:cached_buffers_used=cached_avg,buffers_avg_nn,+,used_avg,+",
+        "CDEF:buffers_used=buffers_avg,used_avg,+",
+        "XPORT:free_min:MIN:%5.1lf%s Min,",
+        "XPORT:free_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:free_max:MAX:%5.1lf%s Max,",
+        "XPORT:free_avg:LAST:%5.1lf%s Last\n",
+        "XPORT:cached_min:MIN:%5.1lf%s Min,",
+        "XPORT:cached_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:cached_max:MAX:%5.1lf%s Max,",
+        "XPORT:cached_avg:LAST:%5.1lf%s Last\n",
+        "XPORT:buffers_min:MIN:%5.1lf%s Min,",
+        "XPORT:buffers_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:buffers_max:MAX:%5.1lf%s Max,",
+        "XPORT:buffers_avg:LAST:%5.1lf%s Last\n",
+        "XPORT:used_min:MIN:%5.1lf%s Min,",
+        "XPORT:used_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:used_max:MAX:%5.1lf%s Max,",
+        "XPORT:used_avg:LAST:%5.1lf%s Last"
+    ],
+    "mysql_commands": [
+        "Issues/s",
+        "DEF:val_avg={file}:value:AVERAGE",
+        "DEF:val_min={file}:value:MIN",
+        "DEF:val_max={file}:value:MAX",
+        "XPORT:val_min:MIN:%5.2lf Min,",
+        "XPORT:val_avg:AVERAGE:%5.2lf Avg,",
+        "XPORT:val_max:MAX:%5.2lf Max,",
+        "XPORT:val_avg:LAST:%5.2lf Last"
+    ],
+    "mysql_handler": [
+        "Issues/s",
+        "DEF:val_avg={file}:value:AVERAGE",
+        "DEF:val_min={file}:value:MIN",
+        "DEF:val_max={file}:value:MAX",
+        "XPORT:val_min:MIN:%5.2lf Min,",
+        "XPORT:val_avg:AVERAGE:%5.2lf Avg,",
+        "XPORT:val_max:MAX:%5.2lf Max,",
+        "XPORT:val_avg:LAST:%5.2lf Last"
+    ],
+    "mysql_octets": [
+        "Bits/s",
+        "DEF:out_min={file}:tx:MIN",
+        "DEF:out_avg={file}:tx:AVERAGE",
+        "DEF:out_max={file}:tx:MAX",
+        "DEF:inc_min={file}:rx:MIN",
+        "DEF:inc_avg={file}:rx:AVERAGE",
+        "DEF:inc_max={file}:rx:MAX",
+        "CDEF:mytime=out_avg,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*",
+        "CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+",
+        "CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*",
+        "CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+",
+        "CDEF:out_bit_min=out_min,8,*",
+        "CDEF:out_bit_avg=out_avg,8,*",
+        "CDEF:out_bit_max=out_max,8,*",
+        "CDEF:inc_bit_min=inc_min,8,*",
+        "CDEF:inc_bit_avg=inc_avg,8,*",
+        "CDEF:inc_bit_max=inc_max,8,*",
+"CDEF:overlap=out_bit_avg,inc_bit_avg,GT,inc_bit_avg,out_bit_avg,IF",
+        "XPORT:out_bit_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:out_bit_max:MAX:%5.1lf%s Max,",
+        "XPORT:out_bit_avg:LAST:%5.1lf%s Last",
+        "XPORT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l",
+        "XPORT:inc_bit_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:inc_bit_max:MAX:%5.1lf%s Max,",
+        "XPORT:inc_bit_avg:LAST:%5.1lf%s Last",
+        "XPORT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l"
+    ],
+    "mysql_qcache": [
+        "Queries/s",
+        "DEF:hits_min={file}:hits:MIN",
+        "DEF:hits_avg={file}:hits:AVERAGE",
+        "DEF:hits_max={file}:hits:MAX",
+        "DEF:inserts_min={file}:inserts:MIN",
+        "DEF:inserts_avg={file}:inserts:AVERAGE",
+        "DEF:inserts_max={file}:inserts:MAX",
+        "DEF:not_cached_min={file}:not_cached:MIN",
+        "DEF:not_cached_avg={file}:not_cached:AVERAGE",
+        "DEF:not_cached_max={file}:not_cached:MAX",
+        "DEF:lowmem_prunes_min={file}:lowmem_prunes:MIN",
+        "DEF:lowmem_prunes_avg={file}:lowmem_prunes:AVERAGE",
+        "DEF:lowmem_prunes_max={file}:lowmem_prunes:MAX",
+        "DEF:queries_min={file}:queries_in_cache:MIN",
+        "DEF:queries_avg={file}:queries_in_cache:AVERAGE",
+        "DEF:queries_max={file}:queries_in_cache:MAX",
+        "CDEF:unknown=queries_avg,UNKN,+",
+        "CDEF:not_cached_agg=hits_avg,inserts_avg,+,not_cached_avg,+",
+        "CDEF:inserts_agg=hits_avg,inserts_avg,+",
+        "CDEF:hits_agg=hits_avg",
+        "XPORT:not_cached_min:MIN:%5.2lf Min,",
+        "XPORT:not_cached_avg:AVERAGE:%5.2lf Avg,",
+        "XPORT:not_cached_max:MAX:%5.2lf Max,",
+        "XPORT:not_cached_avg:LAST:%5.2lf Last\\l",
+        "XPORT:inserts_min:MIN:%5.2lf Min,",
+        "XPORT:inserts_avg:AVERAGE:%5.2lf Avg,",
+        "XPORT:inserts_max:MAX:%5.2lf Max,",
+        "XPORT:inserts_avg:LAST:%5.2lf Last\\l",
+        "XPORT:hits_min:MIN:%5.2lf Min,",
+        "XPORT:hits_avg:AVERAGE:%5.2lf Avg,",
+        "XPORT:hits_max:MAX:%5.2lf Max,",
+        "XPORT:hits_avg:LAST:%5.2lf Last\\l",
+        "XPORT:lowmem_prunes_min:MIN:%5.2lf Min,",
+        "XPORT:lowmem_prunes_avg:AVERAGE:%5.2lf Avg,",
+        "XPORT:lowmem_prunes_max:MAX:%5.2lf Max,",
+        "XPORT:lowmem_prunes_avg:LAST:%5.2lf Last\\l",
+        "XPORT:queries_min:MIN:%5.0lf Min,",
+        "XPORT:queries_avg:AVERAGE:%5.0lf Avg,",
+        "XPORT:queries_max:MAX:%5.0lf Max,",
+        "XPORT:queries_avg:LAST:%5.0lf Last\\l"
+    ],
+    "mysql_threads": [
+        "Threads",
+        "DEF:running_min={file}:running:MIN",
+        "DEF:running_avg={file}:running:AVERAGE",
+        "DEF:running_max={file}:running:MAX",
+        "DEF:connected_min={file}:connected:MIN",
+        "DEF:connected_avg={file}:connected:AVERAGE",
+        "DEF:connected_max={file}:connected:MAX",
+        "DEF:cached_min={file}:cached:MIN",
+        "DEF:cached_avg={file}:cached:AVERAGE",
+        "DEF:cached_max={file}:cached:MAX",
+        "DEF:created_min={file}:created:MIN",
+        "DEF:created_avg={file}:created:AVERAGE",
+        "DEF:created_max={file}:created:MAX",
+        "CDEF:unknown=created_avg,UNKN,+",
+        "CDEF:cached_agg=connected_avg,cached_avg,+",
+        "XPORT:cached_min:MIN:%5.1lf Min,",
+        "XPORT:cached_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:cached_max:MAX:%5.1lf Max,",
+        "XPORT:cached_avg:LAST:%5.1lf Last\\l",
+        "XPORT:connected_min:MIN:%5.1lf Min,",
+        "XPORT:connected_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:connected_max:MAX:%5.1lf Max,",
+        "XPORT:connected_avg:LAST:%5.1lf Last\\l",
+        "XPORT:running_min:MIN:%5.1lf Min,",
+        "XPORT:running_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:running_max:MAX:%5.1lf Max,",
+        "XPORT:running_avg:LAST:%5.1lf Last\\l",
+        "XPORT:created_min:MIN:%5.0lf Min,",
+        "XPORT:created_avg:AVERAGE:%5.0lf Avg,",
+        "XPORT:created_max:MAX:%5.0lf Max,",
+        "XPORT:created_avg:LAST:%5.0lf Last\\l"
+    ],
+    "nfs_procedure": [
+        "-v",                           "Issues/s",
+        "DEF:avg={file}:value:AVERAGE", "DEF:min={file}:value:MIN",
+        "XPORT:min:MIN:%6.2lf Min,",   "XPORT:avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:max:MAX:%6.2lf Max,",   "XPORT:avg:LAST:%6.2lf Last\\l"
+    ],
+    "nfs3_procedures": [
+        "DEF:null_avg={file}:null:AVERAGE",
+        "DEF:getattr_avg={file}:getattr:AVERAGE",
+        "DEF:setattr_avg={file}:setattr:AVERAGE",
+        "DEF:lookup_avg={file}:lookup:AVERAGE",
+        "DEF:access_avg={file}:access:AVERAGE",
+        "DEF:readlink_avg={file}:readlink:AVERAGE",
+        "DEF:read_avg={file}:read:AVERAGE",
+        "DEF:write_avg={file}:write:AVERAGE",
+        "DEF:create_avg={file}:create:AVERAGE",
+        "DEF:mkdir_avg={file}:mkdir:AVERAGE",
+        "DEF:symlink_avg={file}:symlink:AVERAGE",
+        "DEF:mknod_avg={file}:mknod:AVERAGE",
+        "DEF:remove_avg={file}:remove:AVERAGE",
+        "DEF:rmdir_avg={file}:rmdir:AVERAGE",
+        "DEF:rename_avg={file}:rename:AVERAGE",
+        "DEF:link_avg={file}:link:AVERAGE",
+        "DEF:readdir_avg={file}:readdir:AVERAGE",
+        "DEF:readdirplus_avg={file}:readdirplus:AVERAGE",
+        "DEF:fsstat_avg={file}:fsstat:AVERAGE",
+        "DEF:fsinfo_avg={file}:fsinfo:AVERAGE",
+        "DEF:pathconf_avg={file}:pathconf:AVERAGE",
+        "DEF:commit_avg={file}:commit:AVERAGE",
+        "DEF:null_max={file}:null:MAX",
+        "DEF:getattr_max={file}:getattr:MAX",
+        "DEF:setattr_max={file}:setattr:MAX",
+        "DEF:lookup_max={file}:lookup:MAX",
+        "DEF:access_max={file}:access:MAX",
+        "DEF:readlink_max={file}:readlink:MAX",
+        "DEF:read_max={file}:read:MAX",
+        "DEF:write_max={file}:write:MAX",
+        "DEF:create_max={file}:create:MAX",
+        "DEF:mkdir_max={file}:mkdir:MAX",
+        "DEF:symlink_max={file}:symlink:MAX",
+        "DEF:mknod_max={file}:mknod:MAX",
+        "DEF:remove_max={file}:remove:MAX",
+        "DEF:rmdir_max={file}:rmdir:MAX",
+        "DEF:rename_max={file}:rename:MAX",
+        "DEF:link_max={file}:link:MAX",
+        "DEF:readdir_max={file}:readdir:MAX",
+        "DEF:readdirplus_max={file}:readdirplus:MAX",
+        "DEF:fsstat_max={file}:fsstat:MAX",
+        "DEF:fsinfo_max={file}:fsinfo:MAX",
+        "DEF:pathconf_max={file}:pathconf:MAX",
+        "DEF:commit_max={file}:commit:MAX",
+        "CDEF:other_avg=null_avg,readlink_avg,create_avg,mkdir_avg,symlink_avg,mknod_avg,remove_avg,rmdir_avg,rename_avg,link_avg,readdir_avg,readdirplus_avg,fsstat_avg,fsinfo_avg,pathconf_avg,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
+        "CDEF:other_max=null_max,readlink_max,create_max,mkdir_max,symlink_max,mknod_max,remove_max,rmdir_max,rename_max,link_max,readdir_max,readdirplus_max,fsstat_max,fsinfo_max,pathconf_max,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
+        "CDEF:stack_read=read_avg",
+        "CDEF:stack_getattr=stack_read,getattr_avg,+",
+        "CDEF:stack_access=stack_getattr,access_avg,+",
+        "CDEF:stack_lookup=stack_access,lookup_avg,+",
+        "CDEF:stack_write=stack_lookup,write_avg,+",
+        "CDEF:stack_commit=stack_write,commit_avg,+",
+        "CDEF:stack_setattr=stack_commit,setattr_avg,+",
+        "CDEF:stack_other=stack_setattr,other_avg,+",
+        "XPORT:other_max:MAX:%5.1lf Max,",
+        "XPORT:other_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:other_avg:LAST:%5.1lf Last\\l",
+        "XPORT:setattr_max:MAX:%5.1lf Max,",
+        "XPORT:setattr_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:setattr_avg:LAST:%5.1lf Last\\l",
+        "XPORT:commit_max:MAX:%5.1lf Max,",
+        "XPORT:commit_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:commit_avg:LAST:%5.1lf Last\\l",
+        "XPORT:write_max:MAX:%5.1lf Max,",
+        "XPORT:write_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:write_avg:LAST:%5.1lf Last\\l",
+        "XPORT:lookup_max:MAX:%5.1lf Max,",
+        "XPORT:lookup_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:lookup_avg:LAST:%5.1lf Last\\l",
+        "XPORT:access_max:MAX:%5.1lf Max,",
+        "XPORT:access_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:access_avg:LAST:%5.1lf Last\\l",
+        "XPORT:getattr_max:MAX:%5.1lf Max,",
+        "XPORT:getattr_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:getattr_avg:LAST:%5.1lf Last\\l",
+        "XPORT:read_max:MAX:%5.1lf Max,",
+        "XPORT:read_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:read_avg:LAST:%5.1lf Last\\l"
+    ],
+    "nginx_requests": [
+        "DEF:min={file}:value:MIN",   "DEF:avg={file}:value:AVERAGE",
+        "XPORT:min:MIN:%6.2lf Min,", "XPORT:avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:max:MAX:%6.2lf Max,", "XPORT:avg:LAST:%6.2lf Last"
+    ],
+    "nginx_connections": [
+        "DEF:min={file}:value:MIN",
+        "DEF:avg={file}:value:AVERAGE",
+        "XPORT:min:MIN:%6.2lf Min,",
+        "XPORT:avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:max:MAX:%6.2lf Max,",
+        "XPORT:avg:LAST:%6.2lf Last"
+    ],
+    "opcode": [
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%9.3lf Min,",
+        "XPORT:avg:AVERAGE:%9.3lf Average,",
+        "XPORT:max:MAX:%9.3lf Max,",
+        "XPORT:avg:LAST:%9.3lf Last\\l"
+    ],
+    "partition": [
+        "DEF:rbyte_avg={file}:rbytes:AVERAGE",
+        "DEF:rbyte_min={file}:rbytes:MIN",
+        "DEF:rbyte_max={file}:rbytes:MAX",
+        "DEF:wbyte_avg={file}:wbytes:AVERAGE",
+        "DEF:wbyte_min={file}:wbytes:MIN",
+        "DEF:wbyte_max={file}:wbytes:MAX",
+        "CDEF:overlap=wbyte_avg,rbyte_avg,GT,rbyte_avg,wbyte_avg,IF",
+        "XPORT:wbyte_min:MIN:%5.1lf%s Min,",
+        "XPORT:wbyte_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:wbyte_max:MAX:%5.1lf%s Max,",
+        "XPORT:wbyte_avg:LAST:%5.1lf%s Last\\l",
+        "XPORT:rbyte_min:MIN:%5.1lf%s Min,",
+        "XPORT:rbyte_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:rbyte_max:MAX:%5.1lf%s Max,",
+        "XPORT:rbyte_avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "percent": [
+        "DEF:avg={file}:percent:AVERAGE",
+        "XPORT:avg:Percent",
+    ],
+    "ping": [
+        "DEF:ping_avg={file}:ping:AVERAGE",
+        "DEF:ping_min={file}:ping:MIN",
+        "DEF:ping_max={file}:ping:MAX",
+        "XPORT:ping_min:MIN:%4.1lf ms Min,",
+        "XPORT:ping_avg:AVERAGE:%4.1lf ms Avg,",
+        "XPORT:ping_max:MAX:%4.1lf ms Max,",
+        "XPORT:ping_avg:LAST:%4.1lf ms Last"
+    ],
+    "ping_droprate": [
+        "Percent",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "LINE2:avg#$FullRed:Percent",
+        "XPORT:min:MIN:%5.1lf%% Min,",
+        "XPORT:avg:AVERAGE:%5.1lf%% Avg,",
+        "XPORT:max:MAX:%5.1lf%% Max,",
+        "XPORT:avg:LAST:%5.1lf%% Last\\l"
+    ],
+    "pg_blks": [
+        "DEF:pg_blks_avg={file}:value:AVERAGE",
+        "DEF:pg_blks_min={file}:value:MIN",
+        "DEF:pg_blks_max={file}:value:MAX",
+        "XPORT:pg_blks_min:MIN:%4.1lf%s Min,",
+        "XPORT:pg_blks_avg:AVERAGE:%4.1lf%s Avg,",
+        "XPORT:pg_blks_max:MAX:%4.1lf%s Max,",
+        "XPORT:pg_blks_avg:LAST:%4.1lf%s Last"],
+    "pg_db_size": [
+        "DEF:pg_db_size_avg={file}:value:AVERAGE",
+        "DEF:pg_db_size_min={file}:value:MIN",
+        "DEF:pg_db_size_max={file}:value:MAX",
+        "XPORT:pg_db_size_min:MIN:%4.1lf%s Min,",
+        "XPORT:pg_db_size_avg:AVERAGE:%4.1lf%s Avg,",
+        "XPORT:pg_db_size_max:MAX:%4.1lf%s Max,",
+        "XPORT:pg_db_size_avg:LAST:%4.1lf%s Last"],
+    "pg_n_tup_c": [
+        "DEF:pg_n_tup_avg={file}:value:AVERAGE",
+        "DEF:pg_n_tup_min={file}:value:MIN",
+        "DEF:pg_n_tup_max={file}:value:MAX",
+        "XPORT:pg_n_tup_min:MIN:%4.1lf%s Min,",
+        "XPORT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,",
+        "XPORT:pg_n_tup_max:MAX:%4.1lf%s Max,",
+        "XPORT:pg_n_tup_avg:LAST:%4.1lf%s Last"],
+    "pg_n_tup_g": [
+        "DEF:pg_n_tup_avg={file}:value:AVERAGE",
+        "DEF:pg_n_tup_min={file}:value:MIN",
+        "DEF:pg_n_tup_max={file}:value:MAX",
+        "XPORT:pg_n_tup_min:MIN:%4.1lf%s Min,",
+        "XPORT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,",
+        "XPORT:pg_n_tup_max:MAX:%4.1lf%s Max,",
+        "XPORT:pg_n_tup_avg:LAST:%4.1lf%s Last"],
+    "pg_numbackends": [
+        "DEF:pg_numbackends_avg={file}:value:AVERAGE",
+        "DEF:pg_numbackends_min={file}:value:MIN",
+        "DEF:pg_numbackends_max={file}:value:MAX",
+        "XPORT:pg_numbackends_min:MIN:%4.1lf%s Min,",
+        "XPORT:pg_numbackends_avg:AVERAGE:%4.1lf%s Avg,",
+        "XPORT:pg_numbackends_max:MAX:%4.1lf%s Max,",
+        "XPORT:pg_numbackends_avg:LAST:%4.1lf%s Last"],
+    "pg_scan": [
+        "DEF:pg_scan_avg={file}:value:AVERAGE",
+        "DEF:pg_scan_min={file}:value:MIN",
+        "DEF:pg_scan_max={file}:value:MAX",
+        "XPORT:pg_scan_min:MIN:%4.1lf%s Min,",
+        "XPORT:pg_scan_avg:AVERAGE:%4.1lf%s Avg,",
+        "XPORT:pg_scan_max:MAX:%4.1lf%s Max,",
+        "XPORT:pg_scan_avg:LAST:%4.1lf%s Last"],
+    "pg_xact": [
+        "DEF:pg_xact_avg={file}:value:AVERAGE",
+        "DEF:pg_xact_min={file}:value:MIN",
+        "DEF:pg_xact_max={file}:value:MAX",
+        "XPORT:pg_xact_min:MIN:%4.1lf%s Min,",
+        "XPORT:pg_xact_avg:AVERAGE:%4.1lf%s Avg,",
+        "XPORT:pg_xact_max:MAX:%4.1lf%s Max,",
+        "XPORT:pg_xact_avg:LAST:%4.1lf%s Last"],
+    "power": [
+        "Watt",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%5.1lf%sW Min,",
+        "XPORT:avg:AVERAGE:%5.1lf%sW Avg,",
+        "XPORT:max:MAX:%5.1lf%sW Max,",
+        "XPORT:avg:LAST:%5.1lf%sW Last\\l"
+    ],
+    "processes": [
+        "DEF:running_avg={file}:running:AVERAGE",
+        "DEF:running_min={file}:running:MIN",
+        "DEF:running_max={file}:running:MAX",
+        "DEF:sleeping_avg={file}:sleeping:AVERAGE",
+        "DEF:sleeping_min={file}:sleeping:MIN",
+        "DEF:sleeping_max={file}:sleeping:MAX",
+        "DEF:zombies_avg={file}:zombies:AVERAGE",
+        "DEF:zombies_min={file}:zombies:MIN",
+        "DEF:zombies_max={file}:zombies:MAX",
+        "DEF:stopped_avg={file}:stopped:AVERAGE",
+        "DEF:stopped_min={file}:stopped:MIN",
+        "DEF:stopped_max={file}:stopped:MAX",
+        "DEF:paging_avg={file}:paging:AVERAGE",
+        "DEF:paging_min={file}:paging:MIN",
+        "DEF:paging_max={file}:paging:MAX",
+        "DEF:blocked_avg={file}:blocked:AVERAGE",
+        "DEF:blocked_min={file}:blocked:MIN",
+        "DEF:blocked_max={file}:blocked:MAX",
+        "CDEF:paging_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,blocked_avg,paging_avg,+,+,+,+,+",
+        "CDEF:blocked_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,blocked_avg,+,+,+,+",
+        "CDEF:zombies_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,+,+,+",
+        "CDEF:stopped_acc=sleeping_avg,running_avg,stopped_avg,+,+",
+        "CDEF:running_acc=sleeping_avg,running_avg,+",
+        "CDEF:sleeping_acc=sleeping_avg",
+        "XPORT:paging_min:MIN:%5.1lf Min,",
+        "XPORT:paging_avg:AVERAGE:%5.1lf Average,",
+        "XPORT:paging_max:MAX:%5.1lf Max,",
+        "XPORT:paging_avg:LAST:%5.1lf Last\\l",
+        "XPORT:blocked_min:MIN:%5.1lf Min,",
+        "XPORT:blocked_avg:AVERAGE:%5.1lf Average,",
+        "XPORT:blocked_max:MAX:%5.1lf Max,",
+        "XPORT:blocked_avg:LAST:%5.1lf Last\\l",
+        "XPORT:zombies_min:MIN:%5.1lf Min,",
+        "XPORT:zombies_avg:AVERAGE:%5.1lf Average,",
+        "XPORT:zombies_max:MAX:%5.1lf Max,",
+        "XPORT:zombies_avg:LAST:%5.1lf Last\\l",
+        "XPORT:stopped_min:MIN:%5.1lf Min,",
+        "XPORT:stopped_avg:AVERAGE:%5.1lf Average,",
+        "XPORT:stopped_max:MAX:%5.1lf Max,",
+        "XPORT:stopped_avg:LAST:%5.1lf Last\\l",
+        "XPORT:running_min:MIN:%5.1lf Min,",
+        "XPORT:running_avg:AVERAGE:%5.1lf Average,",
+        "XPORT:running_max:MAX:%5.1lf Max,",
+        "XPORT:running_avg:LAST:%5.1lf Last\\l",
+        "XPORT:sleeping_min:MIN:%5.1lf Min,",
+        "XPORT:sleeping_avg:AVERAGE:%5.1lf Average,",
+        "XPORT:sleeping_max:MAX:%5.1lf Max,",
+        "XPORT:sleeping_avg:LAST:%5.1lf Last\\l"
+    ],
+    "ps_count": [
+        "Processes",
+        "DEF:procs_avg={file}:processes:AVERAGE",
+        "DEF:procs_min={file}:processes:MIN",
+        "DEF:procs_max={file}:processes:MAX",
+        "DEF:thrds_avg={file}:threads:AVERAGE",
+        "DEF:thrds_min={file}:threads:MIN",
+        "DEF:thrds_max={file}:threads:MAX",
+        "XPORT:thrds_min:MIN:%5.1lf Min,",
+        "XPORT:thrds_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:thrds_max:MAX:%5.1lf Max,",
+        "XPORT:thrds_avg:LAST:%5.1lf Last\\l",
+        "XPORT:procs_min:MIN:%5.1lf Min,",
+        "XPORT:procs_avg:AVERAGE:%5.1lf Avg,",
+        "XPORT:procs_max:MAX:%5.1lf Max,",
+        "XPORT:procs_avg:LAST:%5.1lf Last\\l"
+    ],
+    "ps_cputime": [
+        "Jiffies",
+        "DEF:user_avg_raw={file}:user:AVERAGE",
+        "DEF:user_min_raw={file}:user:MIN",
+        "DEF:user_max_raw={file}:user:MAX",
+        "DEF:syst_avg_raw={file}:syst:AVERAGE",
+        "DEF:syst_min_raw={file}:syst:MIN",
+        "DEF:syst_max_raw={file}:syst:MAX",
+        "CDEF:user_avg=user_avg_raw,1000000,/",
+        "CDEF:user_min=user_min_raw,1000000,/",
+        "CDEF:user_max=user_max_raw,1000000,/",
+        "CDEF:syst_avg=syst_avg_raw,1000000,/",
+        "CDEF:syst_min=syst_min_raw,1000000,/",
+        "CDEF:syst_max=syst_max_raw,1000000,/",
+        "CDEF:user_syst=syst_avg,UN,0,syst_avg,IF,user_avg,+",
+        "XPORT:user_min:MIN:%5.1lf%s Min,",
+        "XPORT:user_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:user_max:MAX:%5.1lf%s Max,",
+        "XPORT:user_avg:LAST:%5.1lf%s Last\\l",
+        "XPORT:syst_min:MIN:%5.1lf%s Min,",
+        "XPORT:syst_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:syst_max:MAX:%5.1lf%s Max,",
+        "XPORT:syst_avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "ps_pagefaults": [
+        "Pagefaults/s",
+        "DEF:minor_avg={file}:minflt:AVERAGE",
+        "DEF:minor_min={file}:minflt:MIN",
+        "DEF:minor_max={file}:minflt:MAX",
+        "DEF:major_avg={file}:majflt:AVERAGE",
+        "DEF:major_min={file}:majflt:MIN",
+        "DEF:major_max={file}:majflt:MAX",
+        "CDEF:minor_major=major_avg,UN,0,major_avg,IF,minor_avg,+",
+        "XPORT:minor_min:MIN:%5.1lf%s Min,",
+        "XPORT:minor_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:minor_max:MAX:%5.1lf%s Max,",
+        "XPORT:minor_avg:LAST:%5.1lf%s Last\\l",
+        "XPORT:major_min:MIN:%5.1lf%s Min,",
+        "XPORT:major_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:major_max:MAX:%5.1lf%s Max,",
+        "XPORT:major_avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "ps_rss": [
+        "Bytes",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%5.1lf%s Min,",
+        "XPORT:avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:max:MAX:%5.1lf%s Max,",
+        "XPORT:avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "ps_state": [
+        "-v",                           "Processes",
+        "DEF:avg={file}:value:AVERAGE", "DEF:min={file}:value:MIN",
+        "XPORT:min:MIN:%6.2lf Min,",   "XPORT:avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:max:MAX:%6.2lf Max,",   "XPORT:avg:LAST:%6.2lf Last\\l"
+    ],
+    "ps_disk_octets": [
+        "Bytes/s",
+        "DEF:out_min={file}:write:MIN",
+        "DEF:out_avg={file}:write:AVERAGE",
+        "DEF:out_max={file}:write:MAX",
+        "DEF:inc_min={file}:read:MIN",
+        "DEF:inc_avg={file}:read:AVERAGE",
+        "DEF:inc_max={file}:read:MAX",
+        "CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF",
+        "CDEF:mytime=out_avg,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*",
+        "CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+",
+        "CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*",
+        "CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+",
+        "XPORT:out_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:out_max:MAX:%5.1lf%s Max,",
+        "XPORT:out_avg:LAST:%5.1lf%s Last",
+        "XPORT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l",
+        "XPORT:inc_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:inc_max:MAX:%5.1lf%s Max,",
+        "XPORT:inc_avg:LAST:%5.1lf%s Last",
+        "XPORT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l"
+    ],
+    "ps_disk_ops": [
+        "Ops/s",
+        "DEF:out_min={file}:write:MIN",
+        "DEF:out_avg={file}:write:AVERAGE",
+        "DEF:out_max={file}:write:MAX",
+        "DEF:inc_min={file}:read:MIN",
+        "DEF:inc_avg={file}:read:AVERAGE",
+        "DEF:inc_max={file}:read:MAX",
+        "CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF",
+        "XPORT:out_avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:out_max:MAX:%6.2lf Max,",
+        "XPORT:out_avg:LAST:%6.2lf Last\\l",
+        "XPORT:inc_avg:AVERAGE:%6.2lf Avg,",
+        "XPORT:inc_max:MAX:%6.2lf Max,",
+        "XPORT:inc_avg:LAST:%6.2lf Last\\l"
+    ],
+    "uptime": [
+        "Days",
+        "DEF:avg_raw={file}:value:AVERAGE",
+        "DEF:min_raw={file}:value:MIN",
+        "DEF:max_raw={file}:value:MAX",
+        "CDEF:avg=avg_raw,86400,/",
+        "CDEF:min=min_raw,86400,/",
+        "CDEF:max=max_raw,86400,/",
+        "XPORT:min:MIN:%9.3lf Min,",
+        "XPORT:avg:AVERAGE:%9.3lf Average,",
+        "XPORT:max:MAX:%9.3lf Max,",
+        "XPORT:avg:LAST:%9.3lf Last\\l"
+    ],
+    "vmpage_number": [
+        "Pages",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%4.1lf Min,",
+        "XPORT:avg:AVERAGE:%4.1lf Avg,",
+        "XPORT:max:MAX:%4.1lf Max,",
+        "XPORT:avg:LAST:%4.1lf Last\\l"
+    ],
+    "vmpage_faults": [
+        "DEF:minf_avg={file}:minflt:AVERAGE",
+        "DEF:minf_min={file}:minflt:MIN",
+        "DEF:minf_max={file}:minflt:MAX",
+        "DEF:majf_avg={file}:majflt:AVERAGE",
+        "DEF:majf_min={file}:majflt:MIN",
+        "DEF:majf_max={file}:majflt:MAX",
+        "CDEF:overlap=majf_avg,minf_avg,GT,minf_avg,majf_avg,IF",
+        "XPORT:majf_min:MIN:%5.1lf%s Min,",
+        "XPORT:majf_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:majf_max:MAX:%5.1lf%s Max,",
+        "XPORT:majf_avg:LAST:%5.1lf%s Last\\l",
+        "XPORT:minf_min:MIN:%5.1lf%s Min,",
+        "XPORT:minf_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:minf_max:MAX:%5.1lf%s Max,",
+        "XPORT:minf_avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "vmpage_io": [
+        "DEF:rpag_avg={file}:in:AVERAGE",
+        "DEF:rpag_min={file}:in:MIN",
+        "DEF:rpag_max={file}:in:MAX",
+        "DEF:wpag_avg={file}:out:AVERAGE",
+        "DEF:wpag_min={file}:out:MIN",
+        "DEF:wpag_max={file}:out:MAX",
+        "CDEF:overlap=wpag_avg,rpag_avg,GT,rpag_avg,wpag_avg,IF",
+        "XPORT:wpag_min:MIN:%5.1lf%s Min,",
+        "XPORT:wpag_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:wpag_max:MAX:%5.1lf%s Max,",
+        "XPORT:wpag_avg:LAST:%5.1lf%s Last\\l",
+        "XPORT:rpag_min:MIN:%5.1lf%s Min,",
+        "XPORT:rpag_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:rpag_max:MAX:%5.1lf%s Max,",
+        "XPORT:rpag_avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "vmpage_action": [
+        "Pages",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%4.1lf Min,",
+        "XPORT:avg:AVERAGE:%4.1lf Avg,",
+        "XPORT:max:MAX:%4.1lf Max,",
+        "XPORT:avg:LAST:%4.1lf Last\\l"
+    ],
+    "qtype": [
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%9.3lf Min,",
+        "XPORT:avg:AVERAGE:%9.3lf Average,",
+        "XPORT:max:MAX:%9.3lf Max,",
+        "XPORT:avg:LAST:%9.3lf Last\\l"
+    ],
+    "rcode": [
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%9.3lf Min,",
+        "XPORT:avg:AVERAGE:%9.3lf Average,",
+        "XPORT:max:MAX:%9.3lf Max,",
+        "XPORT:avg:LAST:%9.3lf Last\\l"
+    ],
+    "swap": [
+        "Bytes",
+        "-b",
+        "1024",
+        "DEF:avg={file}:value:AVERAGE",
+        "DEF:min={file}:value:MIN",
+        "DEF:max={file}:value:MAX",
+        "XPORT:min:MIN:%6.2lf%sByte Min,",
+        "XPORT:avg:AVERAGE:%6.2lf%sByte Avg,",
+        "XPORT:max:MAX:%6.2lf%sByte Max,",
+        "XPORT:avg:LAST:%6.2lf%sByte Last\\l"
+    ],
+    "swap_io": [
+         "DEF:min={file}:value:MIN",   "DEF:avg={file}:value:AVERAGE",
+         "XPORT:min:MIN:%6.2lf Min,", "XPORT:avg:AVERAGE:%6.2lf Avg,",
+         "XPORT:max:MAX:%6.2lf Max,", "XPORT:avg:LAST:%6.2lf Last"
+     ],
+    "old_swap": [
+        "DEF:used_avg={file}:used:AVERAGE",
+        "DEF:used_min={file}:used:MIN",
+        "DEF:used_max={file}:used:MAX",
+        "DEF:free_avg={file}:free:AVERAGE",
+        "DEF:free_min={file}:free:MIN",
+        "DEF:free_max={file}:free:MAX",
+        "DEF:cach_avg={file}:cached:AVERAGE",
+        "DEF:cach_min={file}:cached:MIN",
+        "DEF:cach_max={file}:cached:MAX",
+        "DEF:resv_avg={file}:resv:AVERAGE",
+        "DEF:resv_min={file}:resv:MIN",
+        "DEF:resv_max={file}:resv:MAX",
+        "CDEF:cach_avg_notnull=cach_avg,UN,0,cach_avg,IF",
+        "CDEF:resv_avg_notnull=resv_avg,UN,0,resv_avg,IF",
+        "CDEF:used_acc=used_avg",
+        "CDEF:resv_acc=used_acc,resv_avg_notnull,+",
+        "CDEF:cach_acc=resv_acc,cach_avg_notnull,+",
+        "CDEF:free_acc=cach_acc,free_avg,+",
+        "XPORT:free_min:MIN:%5.1lf%s Min,",
+        "XPORT:free_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:free_max:MAX:%5.1lf%s Max,",
+        "XPORT:free_avg:LAST:%5.1lf%s Last\n",
+        "XPORT:cach_min:MIN:%5.1lf%s Min,",
+        "XPORT:cach_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:cach_max:MAX:%5.1lf%s Max,",
+        "XPORT:cach_avg:LAST:%5.1lf%s Last\\l",
+        "XPORT:resv_min:MIN:%5.1lf%s Min,",
+        "XPORT:resv_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:resv_max:MAX:%5.1lf%s Max,",
+        "XPORT:resv_avg:LAST:%5.1lf%s Last\n",
+        "XPORT:used_min:MIN:%5.1lf%s Min,",
+        "XPORT:used_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:used_max:MAX:%5.1lf%s Max,",
+        "XPORT:used_avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "tcp_connections": [
+        "-v",                           "Connections",
+        "DEF:avg={file}:value:AVERAGE", "DEF:min={file}:value:MIN",
+        "XPORT:min:MIN:%4.1lf Min,",   "XPORT:avg:AVERAGE:%4.1lf Avg,",
+        "XPORT:max:MAX:%4.1lf Max,",   "XPORT:avg:LAST:%4.1lf Last\\l"
+    ],
+    "temperature": [
+        "DEF:temp_avg={file}:value:AVERAGE",
+        "DEF:temp_min={file}:value:MIN",
+        "DEF:temp_max={file}:value:MAX",
+        "CDEF:average=temp_avg,0.2,*,PREV,UN,temp_avg,PREV,IF,0.8,*,+",
+        "XPORT:temp_avg:average",
+        "XPORT:average:average",
+    ],
+    "timeleft": [
+        "DEF:avg={file}:timeleft:AVERAGE",
+        "XPORT:avg:Minutes",
+    ],
+    "time_offset": [
+        "DEF:s_avg={file}:seconds:AVERAGE",
+        "DEF:s_min={file}:seconds:MIN",
+        "DEF:s_max={file}:seconds:MAX",
+        "XPORT:s_min:MIN:%7.3lf%s Min,",
+        "XPORT:s_avg:AVERAGE:%7.3lf%s Avg,",
+        "XPORT:s_max:MAX:%7.3lf%s Max,",
+        "XPORT:s_avg:LAST:%7.3lf%s Last"
+    ],
+    "if_octets": [
+        "-v", "Bits/s", "-l", "0",
+        "DEF:out_min_raw={file}:tx:MIN",
+        "DEF:out_avg_raw={file}:tx:AVERAGE",
+        "DEF:out_max_raw={file}:tx:MAX",
+        "DEF:inc_min_raw={file}:rx:MIN",
+        "DEF:inc_avg_raw={file}:rx:AVERAGE",
+        "DEF:inc_max_raw={file}:rx:MAX",
+        "CDEF:out_min=out_min_raw,8,*",
+        "CDEF:out_avg=out_avg_raw,8,*",
+        "CDEF:out_max=out_max_raw,8,*",
+        "CDEF:inc_min=inc_min_raw,8,*",
+        "CDEF:inc_avg=inc_avg_raw,8,*",
+        "CDEF:inc_max=inc_max_raw,8,*",
+        "CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF",
+        "CDEF:mytime=out_avg_raw,TIME,TIME,IF",
+        "CDEF:sample_len_raw=mytime,PREV(mytime),-",
+        "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF",
+        "CDEF:out_avg_sample=out_avg_raw,UN,0,out_avg_raw,IF,sample_len,*",
+        "CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+",
+        "CDEF:inc_avg_sample=inc_avg_raw,UN,0,inc_avg_raw,IF,sample_len,*",
+        "CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+",
+        "VDEF:out_95=out_avg,95,PERCENT",
+        "VDEF:inc_95=inc_avg,95,PERCENT",
+        "LINE2:out_95#$FullGreen",
+        "LINE2:inc_95#$FullBlue",
+        "XPORT:out_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:out_max:MAX:%5.1lf%s Max,",
+        "XPORT:out_avg:LAST:%5.1lf%s Last",
+        "XPORT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l",
+        "XPORT:out_95:%5.1lf%s 95th Percentile\\l",
+        "XPORT:inc_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:inc_max:MAX:%5.1lf%s Max,",
+        "XPORT:inc_avg:LAST:%5.1lf%s Last",
+        "XPORT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l",
+        "XPORT:inc_95:%5.1lf%s 95th Percentile\\l"
+    ],
+    "cpufreq": [
+        "DEF:cpufreq_avg={file}:value:AVERAGE",
+        "DEF:cpufreq_min={file}:value:MIN",
+        "DEF:cpufreq_max={file}:value:MAX",
+        "XPORT:cpufreq_min:MIN:%5.1lf%s Min,",
+        "XPORT:cpufreq_avg:AVERAGE:%5.1lf%s Avg,",
+        "XPORT:cpufreq_max:MAX:%5.1lf%s Max,",
+        "XPORT:cpufreq_avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "multimeter": [
+        "DEF:multimeter_avg={file}:value:AVERAGE",
+        "DEF:multimeter_min={file}:value:MIN",
+        "DEF:multimeter_max={file}:value:MAX",
+        "XPORT:multimeter_min:MIN:%4.1lf Min,",
+        "XPORT:multimeter_avg:AVERAGE:%4.1lf Average,",
+        "XPORT:multimeter_max:MAX:%4.1lf Max,",
+        "XPORT:multimeter_avg:LAST:%4.1lf Last\\l"
+    ],
+    "users": [
+        "Users",
+        "DEF:users_avg={file}:users:AVERAGE",
+        "DEF:users_min={file}:users:MIN",
+        "DEF:users_max={file}:users:MAX",
+        "XPORT:users_min:MIN:%4.1lf Min,",
+        "XPORT:users_avg:AVERAGE:%4.1lf Average,",
+        "XPORT:users_max:MAX:%4.1lf Max,",
+        "XPORT:users_avg:LAST:%4.1lf Last\\l"
+    ],
+    "voltage": [
+        "DEF:avg={file}:value:AVERAGE",
+        "XPORT:avg:Voltage",
+    ],
+    "vs_threads": [
+        "DEF:total_avg={file}:total:AVERAGE",
+        "DEF:total_min={file}:total:MIN",
+        "DEF:total_max={file}:total:MAX",
+        "DEF:running_avg={file}:running:AVERAGE",
+        "DEF:running_min={file}:running:MIN",
+        "DEF:running_max={file}:running:MAX",
+        "DEF:uninterruptible_avg={file}:uninterruptible:AVERAGE",
+        "DEF:uninterruptible_min={file}:uninterruptible:MIN",
+        "DEF:uninterruptible_max={file}:uninterruptible:MAX",
+        "DEF:onhold_avg={file}:onhold:AVERAGE",
+        "DEF:onhold_min={file}:onhold:MIN",
+        "DEF:onhold_max={file}:onhold:MAX",
+        "XPORT:total_min:MIN:%5.1lf Min,",
+        "XPORT:total_avg:AVERAGE:%5.1lf Avg.,",
+        "XPORT:total_max:MAX:%5.1lf Max,",
+        "XPORT:total_avg:LAST:%5.1lf Last\\l",
+        "XPORT:running_min:MIN:%5.1lf Min,",
+        "XPORT:running_avg:AVERAGE:%5.1lf Avg.,",
+        "XPORT:running_max:MAX:%5.1lf Max,",
+        "XPORT:running_avg:LAST:%5.1lf Last\\l",
+        "XPORT:uninterruptible_min:MIN:%5.1lf Min,",
+        "XPORT:uninterruptible_avg:AVERAGE:%5.1lf Avg.,",
+        "XPORT:uninterruptible_max:MAX:%5.1lf Max,",
+        "XPORT:uninterruptible_avg:LAST:%5.1lf Last\\l",
+        "XPORT:onhold_min:MIN:%5.1lf Min,",
+        "XPORT:onhold_avg:AVERAGE:%5.1lf Avg.,",
+        "XPORT:onhold_max:MAX:%5.1lf Max,",
+        "XPORT:onhold_avg:LAST:%5.1lf Last\\l"
+    ],
+    "vs_memory": [
+        "DEF:vm_avg={file}:vm:AVERAGE",
+        "DEF:vm_min={file}:vm:MIN",
+        "DEF:vm_max={file}:vm:MAX",
+        "DEF:vml_avg={file}:vml:AVERAGE",
+        "DEF:vml_min={file}:vml:MIN",
+        "DEF:vml_max={file}:vml:MAX",
+        "DEF:rss_avg={file}:rss:AVERAGE",
+        "DEF:rss_min={file}:rss:MIN",
+        "DEF:rss_max={file}:rss:MAX",
+        "DEF:anon_avg={file}:anon:AVERAGE",
+        "DEF:anon_min={file}:anon:MIN",
+        "DEF:anon_max={file}:anon:MAX",
+        "XPORT:vm_min:MIN:%5.1lf%s Min,",
+        "XPORT:vm_avg:AVERAGE:%5.1lf%s Avg.,",
+        "XPORT:vm_max:MAX:%5.1lf%s Avg.,",
+        "XPORT:vm_avg:LAST:%5.1lf%s Last\\l",
+        "XPORT:vml_min:MIN:%5.1lf%s Min,",
+        "XPORT:vml_avg:AVERAGE:%5.1lf%s Avg.,",
+        "XPORT:vml_max:MAX:%5.1lf%s Avg.,",
+        "XPORT:vml_avg:LAST:%5.1lf%s Last\\l",
+        "XPORT:rss_min:MIN:%5.1lf%s Min,",
+        "XPORT:rss_avg:AVERAGE:%5.1lf%s Avg.,",
+        "XPORT:rss_max:MAX:%5.1lf%s Avg.,",
+        "XPORT:rss_avg:LAST:%5.1lf%s Last\\l",
+        "XPORT:anon_min:MIN:%5.1lf%s Min,",
+        "XPORT:anon_avg:AVERAGE:%5.1lf%s Avg.,",
+        "XPORT:anon_max:MAX:%5.1lf%s Avg.,",
+        "XPORT:anon_avg:LAST:%5.1lf%s Last\\l"
+    ],
+    "vs_processes": [
+        "DEF:proc_avg={file}:total:AVERAGE",
+        "DEF:proc_min={file}:total:MIN",
+        "DEF:proc_max={file}:total:MAX",
+        "XPORT:proc_min:MIN:%4.1lf Min,",
+        "XPORT:proc_avg:AVERAGE:%4.1lf Avg.,",
+        "XPORT:proc_max:MAX:%4.1lf Max,",
+        "XPORT:proc_avg:LAST:%4.1lf Last\\l"
+    ],
+    "haproxy_sessions": [
+        "-v", "Sessions", "-l", "0",
+        "DEF:que_min={file}:qcur:MIN",
+        "DEF:que_ave={file}:qcur:AVERAGE",
+        "DEF:que_max={file}:qcur:MAX",
+        "DEF:ses_min={file}:scur:MIN",
+        "DEF:ses_ave={file}:scur:AVERAGE",
+        "DEF:ses_max={file}:scur:MAX",
+        "XPORT:ses_min:MIN:Min\\: %2.lf",
+        "XPORT:ses_ave:AVERAGE:Ave\\: %2.lf",
+        "XPORT:ses_max:MAX:Max\\: %2.lf",
+        "XPORT:ses_ave:LAST:Last\\: %2.lf\\j",
+        "XPORT:que_min:MIN:Min\\: %2.lf",
+        "XPORT:que_ave:AVERAGE:Ave\\: %2.lf",
+        "XPORT:que_max:MAX:Max\\: %2.lf",
+        "XPORT:que_ave:LAST:Last\\: %2.lf\\j",
+        "COMMENT: \n",
+        "COMMENT: qcur is the current queue size \n",
+        "COMMENT: scur is the current number of sessions "
+    ],
+    "haproxy_traffic": [
+        "-v", "Req/s", "-l", "0",
+        "DEF:stot_min={file}:stot:MIN",
+        "DEF:stot_ave={file}:stot:AVERAGE",
+        "DEF:stot_max={file}:stot:MAX",
+        "XPORT:stot_min:MIN:Min\\: %2.lf",
+        "XPORT:stot_ave:AVERAGE:Ave\\: %2.lf",
+        "XPORT:stot_max:MAX:Max\\: %2.lf",
+        "XPORT:stot_ave:LAST:Last\\: %2.lf\\j"
+    ],
+    "haproxy_status": [
+        "-v", "Status", "-l", "0",
+        "DEF:stat_min={file}:status:MIN",
+        "DEF:stat_ave={file}:status:AVERAGE",
+        "DEF:stat_max={file}:status:MAX",
+        "XPORT:stat_min:MIN:Min\\: %2.lf",
+        "XPORT:stat_ave:AVERAGE:Ave\\: %2.lf",
+        "XPORT:stat_max:MAX:Max\\: %2.lf",
+        "XPORT:stat_ave:LAST:Last\\: %2.lf\\j"
+    ],
+    "response_time": [
+        "-v", "Seconds", "-l", "0",
+        "DEF:rt_avg={file}:value:AVERAGE",
+        "DEF:rt_min={file}:value:MIN",
+        "DEF:rt_max={file}:value:MAX",
+        "XPORT:rt_min:MIN:%4.1lf ms Min,",
+        "XPORT:rt_avg:AVERAGE:%4.1lf ms Avg,",
+        "XPORT:rt_max:MAX:%4.1lf ms Max,",
+        "XPORT:rt_avg:LAST:%4.1lf ms Last"
+    ]
+}

static/css/reset.css

+/* http://meyerweb.com/eric/tools/css/reset/ 
+   v2.0 | 20110126
+   License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed, 
+figure, figcaption, footer, header, hgroup, 
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	font-size: 100%;
+	font: inherit;
+	vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure, 
+footer, header, hgroup, menu, nav, section {
+	display: block;
+}
+body {
+	line-height: 1;
+}
+ol, ul {
+	list-style: none;
+}
+blockquote, q {
+	quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+	content: '';
+	content: none;
+}
+table {
+	border-collapse: collapse;
+	border-spacing: 0;
+}

static/css/style.css

+/* normal styling */
+
+html {
+    overflow-y: scroll;
+}
+
+body {
+    background: #E0E0E0;
+    padding: 5% 10%;
+
+    font-family: "Delicious", sans-serif;
+    font-size: 16pt;
+    line-height: 1.25;
+}
+
+h1 {
+    text-align: center;
+    font-weight: bold;
+    margin-bottom: .5em;
+}
+
+h1 { font-size: 22pt; }
+
+p + p {
+    text-indent: 1em;
+    margin-top: .5em;
+}
+
+a:visited { color: #9A4B3D; }
+a:link { color: #043B4D; }
+
+ul ul {
+    margin-left: 1em;
+}
+
+ul li:before {
+    content: '‣ '
+}
+
+/* main UI layout */
+
+.main {
+    overflow: hidden;
+    background: #ffffff;
+    border: solid 2px #007929;
+}
+
+.sidebar {
+    float: left;
+    width: 25%;
+
+    padding: 1% 0 1% 2%;
+    border-right: solid 2px #007929;
+
+    background: #CBF098;
+    color: #202020;
+}
+
+.content {
+    margin-left: 27%;
+    padding: 1% 2%;
+}
+
+.chart {
+    width: 100%;
+    height: 20em;
+}
+
+/* expando */
+
+li.collapsed:before {
+    content: '⊞ ';
+}
+
+li.expanded:before,
+li.collapsed:hover:before {
+    content: '⊟ ';
+}
+
+li.collapsed:hover > ul {
+    display: block;
+}
+
+li.collapsed ul {
+    display: none;
+}
+

static/js/highcharts/adapters/mootools-adapter.js

+/*
+ Highcharts JS v2.1.9 (2011-11-11)
+ MooTools adapter
+
+ (c) 2010-2011 Torstein H?nsi
+
+ License: www.highcharts.com/license
+*/
+(function(){var e=window,h=e.MooTools.version.substring(0,3),i=h==="1.2"||h==="1.1",m=i||h==="1.3",j=e.$extend||function(){return Object.append.apply(Object,arguments)};e.HighchartsAdapter={init:function(a){var b=Fx.prototype,c=b.start,d=Fx.Morph.prototype,g=d.compute;b.start=function(f){var k=this.element;if(f.d)this.paths=a.init(k,k.d,this.toD);c.apply(this,arguments);return this};d.compute=function(f,k,n){var l=this.paths;if(l)this.element.attr("d",a.step(l[0],l[1],n,this.toD));else return g.apply(this,
+arguments)}},animate:function(a,b,c){var d=a.attr,g=c&&c.complete;if(d&&!a.setStyle){a.getStyle=a.attr;a.setStyle=function(){var f=arguments;a.attr.call(a,f[0],f[1][0])};a.$family=a.uid=true}e.HighchartsAdapter.stop(a);c=new Fx.Morph(d?a:$(a),j({transition:Fx.Transitions.Quad.easeInOut},c));if(b.d)c.toD=b.d;g&&c.addEvent("complete",g);c.start(b);a.fx=c},each:function(a,b){return i?$each(a,b):a.each(b)},map:function(a,b){return a.map(b)},grep:function(a,b){return a.filter(b)},merge:function(){var a=
+arguments,b=[{}],c=a.length;if(i)a=$merge.apply(null,a);else{for(;c--;)if(typeof a[c]!=="boolean")b[c+1]=a[c];a=Object.merge.apply(Object,b)}return a},extendWithEvents:function(a){a.addEvent||(a.nodeName?$(a):j(a,new Events))},addEvent:function(a,b,c){if(typeof b==="string"){if(b==="unload")b="beforeunload";e.HighchartsAdapter.extendWithEvents(a);a.addEvent(b,c)}},removeEvent:function(a,b,c){if(typeof a!=="string"){e.HighchartsAdapter.extendWithEvents(a);if(b){if(b==="unload")b="beforeunload";c?a.removeEvent(b,
+c):a.removeEvents(b)}else a.removeEvents()}},fireEvent:function(a,b,c,d){b={type:b,target:a};b=m?new Event(b):new DOMEvent(b);b=j(b,c);b.preventDefault=function(){d=null};a.fireEvent&&a.fireEvent(b.type,b);d&&d(b)},stop:function(a){a.fx&&a.fx.cancel()}}})();

static/js/highcharts/adapters/mootools-adapter.src.js

+/**
+ * @license Highcharts JS v2.1.9 (2011-11-11)
+ * MooTools adapter
+ *
+ * (c) 2010-2011 Torstein Hønsi
+ *
+ * License: www.highcharts.com/license
+ */
+
+// JSLint options:
+/*global Fx, $, $extend, $each, $merge, Events, Event, DOMEvent */
+
+(function () {
+
+var win = window,
+	mooVersion = win.MooTools.version.substring(0, 3), // Get the first three characters of the version number
+	legacy = mooVersion === '1.2' || mooVersion === '1.1', // 1.1 && 1.2 considered legacy, 1.3 is not.
+	legacyEvent = legacy || mooVersion === '1.3', // In versions 1.1 - 1.3 the event class is named Event, in newer versions it is named DOMEvent.
+	$extend = win.$extend || function () {
+		return Object.append.apply(Object, arguments);
+	};
+
+win.HighchartsAdapter = {
+	/**
+	 * Initialize the adapter. This is run once as Highcharts is first run.
+	 * @param {Object} pathAnim The helper object to do animations across adapters.
+	 */
+	init: function (pathAnim) {
+		var fxProto = Fx.prototype,
+			fxStart = fxProto.start,
+			morphProto = Fx.Morph.prototype,
+			morphCompute = morphProto.compute;
+
+		// override Fx.start to allow animation of SVG element wrappers
+		/*jslint unparam: true*//* allow unused parameters in fx functions */
+		fxProto.start = function (from, to) {
+			var fx = this,
+				elem = fx.element;
+
+			// special for animating paths
+			if (from.d) {
+				//this.fromD = this.element.d.split(' ');
+				fx.paths = pathAnim.init(
+					elem,
+					elem.d,
+					fx.toD
+				);
+			}
+			fxStart.apply(fx, arguments);
+
+			return this; // chainable
+		};
+
+		// override Fx.step to allow animation of SVG element wrappers
+		morphProto.compute = function (from, to, delta) {
+			var fx = this,
+				paths = fx.paths;
+
+			if (paths) {
+				fx.element.attr(
+					'd',
+					pathAnim.step(paths[0], paths[1], delta, fx.toD)
+				);
+			} else {
+				return morphCompute.apply(fx, arguments);
+			}
+		};
+		/*jslint unparam: false*/
+	},
+
+	/**
+	 * Animate a HTML element or SVG element wrapper
+	 * @param {Object} el
+	 * @param {Object} params
+	 * @param {Object} options jQuery-like animation options: duration, easing, callback
+	 */
+	animate: function (el, params, options) {
+		var isSVGElement = el.attr,
+			effect,
+			complete = options && options.complete;
+
+		if (isSVGElement && !el.setStyle) {
+			// add setStyle and getStyle methods for internal use in Moo
+			el.getStyle = el.attr;
+			el.setStyle = function () { // property value is given as array in Moo - break it down
+				var args = arguments;
+				el.attr.call(el, args[0], args[1][0]);
+			};
+			// dirty hack to trick Moo into handling el as an element wrapper
+			el.$family = el.uid = true;
+		}
+
+		// stop running animations
+		win.HighchartsAdapter.stop(el);
+
+		// define and run the effect
+		effect = new Fx.Morph(
+			isSVGElement ? el : $(el),
+			$extend({
+				transition: Fx.Transitions.Quad.easeInOut
+			}, options)
+		);
+
+		// special treatment for paths
+		if (params.d) {
+			effect.toD = params.d;
+		}
+
+		// jQuery-like events
+		if (complete) {
+			effect.addEvent('complete', complete);
+		}
+
+		// run
+		effect.start(params);
+
+		// record for use in stop method
+		el.fx = effect;
+	},
+
+	/**
+	 * MooTool's each function
+	 *
+	 */
+	each: function (arr, fn) {
+		return legacy ?
+			$each(arr, fn) :
+			arr.each(fn);
+	},
+
+	/**
+	 * Map an array
+	 * @param {Array} arr
+	 * @param {Function} fn
+	 */
+	map: function (arr, fn) {
+		return arr.map(fn);
+	},
+
+	/**
+	 * Grep or filter an array
+	 * @param {Array} arr
+	 * @param {Function} fn
+	 */
+	grep: function (arr, fn) {
+		return arr.filter(fn);
+	},
+
+	/**
+	 * Deep merge two objects and return a third
+	 */
+	merge: function () {
+		var args = arguments,
+			args13 = [{}], // MooTools 1.3+
+			i = args.length,
+			ret;
+
+		if (legacy) {
+			ret = $merge.apply(null, args);
+		} else {
+			while (i--) {
+				// Boolean argumens should not be merged.
+				// JQuery explicitly skips this, so we do it here as well.
+				if (typeof args[i] !== 'boolean') {
+					args13[i + 1] = args[i];
+				}
+			}
+			ret = Object.merge.apply(Object, args13);
+		}
+
+		return ret;
+	},
+
+	/**
+	 * Extends an object with Events, if its not done
+	 */
+	extendWithEvents: function (el) {
+		// if the addEvent method is not defined, el is a custom Highcharts object
+		// like series or point
+		if (!el.addEvent) {
+			if (el.nodeName) {
+				el = $(el); // a dynamically generated node
+			} else {
+				$extend(el, new Events()); // a custom object
+			}
+		}
+	},
+
+	/**
+	 * Add an event listener
+	 * @param {Object} el HTML element or custom object
+	 * @param {String} type Event type
+	 * @param {Function} fn Event handler
+	 */
+	addEvent: function (el, type, fn) {
+		if (typeof type === 'string') { // chart broke due to el being string, type function
+
+			if (type === 'unload') { // Moo self destructs before custom unload events
+				type = 'beforeunload';
+			}
+
+			win.HighchartsAdapter.extendWithEvents(el);
+
+			el.addEvent(type, fn);
+		}
+	},
+
+	removeEvent: function (el, type, fn) {
+		if (typeof el === 'string') {
+			// el.removeEvents below apperantly calls this method again. Do not quite understand why, so for now just bail out.
+			return;
+		}
+		win.HighchartsAdapter.extendWithEvents(el);
+		if (type) {
+			if (type === 'unload') { // Moo self destructs before custom unload events
+				type = 'beforeunload';
+			}
+
+			if (fn) {
+				el.removeEvent(type, fn);
+			} else {
+				el.removeEvents(type);
+			}
+		} else {