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/netlink.json | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 plugin/netlink.json (limited to 'plugin/netlink.json') diff --git a/plugin/netlink.json b/plugin/netlink.json new file mode 100644 index 0000000..79fbd8e --- /dev/null +++ b/plugin/netlink.json @@ -0,0 +1,151 @@ +{ + "if_collisions": { + "title": "Collisions ({{PI}})", + "vertical": "Collisions/s", + "type": "stacked", + "legend": { + "value": { + "name": "Collisions" + } + }, + "legend_format": "%5.1lf%s" + }, + "if_dropped": { + "title": "Dropped Packets ({{PI}})", + "vertical": "Packets/s", + "type": "io", + "legend": { + "rx": { + "name": "Receive", + "color": "0000ff" + }, + "tx": { + "name": "Transmit", + "color": "00b000" + } + }, + "legend_format": "%5.1lf%s" + }, + "if_errors": { + "title": "Interface Errors ({{PI}})", + "vertical": "Errors/s", + "type": "io", + "legend": { + "rx": { + "name": "Receive", + "color": "0000ff" + }, + "tx": { + "name": "Transmit", + "color": "00b000" + } + }, + "legend_format": "%5.1lf%s" + }, + "if_multicast": { + "title": "Multicast Packets ({{PI}})", + "vertical": "Packets/s", + "type": "stacked", + "legend": { + "value": { + "name": "Packets", + "color": "0000ff" + } + }, + "legend_format": "%5.1lf%s" + }, + "if_octets": { + "title": "Interface Traffic ({{PI}})", + "vertical": "{{ND}}/second", + "type": "io", + "legend": { + "rx": { + "name": "Receive", + "color": "0000ff" + }, + "tx": { + "name": "Transmit", + "color": "00b000" + } + }, + "legend_format": "%5.1lf%s", + "datasize": true + }, + "if_packets": { + "title": "Interface Packets ({{PI}})", + "vertical": "Packets/s", + "type": "io", + "legend": { + "rx": { + "name": "Receive", + "color": "0000ff" + }, + "tx": { + "name": "Transmit", + "color": "00b000" + } + }, + "legend_format": "%5.1lf%s" + }, + "if_rx_errors": { + "title": "Interface receive errors ({{PI}})", + "vertical": "Errors/s", + "type": "stacked", + "legend": { + "crc": { + "name": "CRC", + "color": "00e000" + }, + "fifo": { + "name": "FiFo", + "color": "f000c0" + }, + "frame": { + "name": "Frame", + "color": "ffb000" + }, + "length": { + "name": "Lenght", + "color": "f00000" + }, + "missed": { + "name": "Missed", + "color": "0000f0" + }, + "over": { + "name": "Over", + "color": "00e0ff" + } + }, + "legend_format": "%5.1lf%s" + }, + "if_tx_errors": { + "title": "Interface transmit errors ({{PI}})", + "vertical": "Errors/s", + "type": "stacked", + "legend": { + "aborted": { + "name": "Aborted", + "color": "f00000" + }, + "carrier": { + "name": "Carrier", + "color": "00e0ff" + }, + "fifo": { + "name": "FiFo", + "color": "00e000" + }, + "heartbeat": { + "name": "Heartbeat", + "color": "ffb000" + }, + "window": { + "name": "Window", + "color": "f000c0" + } + }, + "legend_format": "%5.1lf%s" + } +} + -- cgit v1.1