diff options
Diffstat (limited to '')
92 files changed, 1957 insertions, 2784 deletions
diff --git a/plugin/aggregation.php b/plugin/aggregation.php deleted file mode 100644 index 0d28fae..0000000 --- a/plugin/aggregation.php +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd aggregation plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | |||
| 7 | ## LAYOUT | ||
| 8 | # aggregation-(plugin)-(calculate)/(type)-(type-instance).rrd | ||
| 9 | |||
| 10 | $pi = explode("-", GET('pi')); | ||
| 11 | |||
| 12 | switch($pi[0]) { | ||
| 13 | case 'cpu': | ||
| 14 | require_once 'type/GenericStacked.class.php'; | ||
| 15 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 16 | $obj->data_sources = array('value'); | ||
| 17 | $obj->order = array('idle', 'nice', 'user', 'wait', 'system', 'softirq', 'interrupt', 'steal'); | ||
| 18 | $obj->legend = array( | ||
| 19 | 'idle' => 'Idle', | ||
| 20 | 'nice' => 'Nice', | ||
| 21 | 'user' => 'User', | ||
| 22 | 'wait' => 'Wait-IO', | ||
| 23 | 'system' => 'System', | ||
| 24 | 'softirq' => 'SoftIRQ', | ||
| 25 | 'interrupt' => 'IRQ', | ||
| 26 | 'steal' => 'Steal', | ||
| 27 | ); | ||
| 28 | $obj->colors = array( | ||
| 29 | 'idle' => 'e8e8e8', | ||
| 30 | 'nice' => '00e000', | ||
| 31 | 'user' => '0000ff', | ||
| 32 | 'wait' => 'ffb000', | ||
| 33 | 'system' => 'ff0000', | ||
| 34 | 'softirq' => 'ff00ff', | ||
| 35 | 'interrupt' => 'a000a0', | ||
| 36 | 'steal' => '000000', | ||
| 37 | ); | ||
| 38 | $obj->rrd_title = 'CPU usage'; | ||
| 39 | $obj->rrd_title = sprintf('CPU usage (%s)', $pi[1]); | ||
| 40 | $obj->rrd_vertical = 'Jiffies'; | ||
| 41 | $obj->rrd_format = '%7.2lf'; | ||
| 42 | $obj->rrdtool_opts .= ' -u 100'; | ||
| 43 | |||
| 44 | $obj->rrd_graph(); | ||
| 45 | break; | ||
| 46 | } | ||
diff --git a/plugin/apache.json b/plugin/apache.json new file mode 100644 index 0000000..3774371 --- /dev/null +++ b/plugin/apache.json | |||
| @@ -0,0 +1,143 @@ | |||
| 1 | { | ||
| 2 | "apache_bytes": { | ||
| 3 | "title": "Webserver Traffic ({{PI}})", | ||
| 4 | "vertical": "{{ND}}/s", | ||
| 5 | "legend": { | ||
| 6 | "value": { | ||
| 7 | "name": "Traffic", | ||
| 8 | "color": "0000ff" | ||
| 9 | } | ||
| 10 | }, | ||
| 11 | "legend_format": "%5.1lf" | ||
| 12 | }, | ||
| 13 | "apache_connections": { | ||
| 14 | "title": "Webserver Connections ({{PI}})", | ||
| 15 | "vertical": "Conns/s", | ||
| 16 | "legend": { | ||
| 17 | "value": { | ||
| 18 | "name": "Conns/s", | ||
| 19 | "color": "00b000" | ||
| 20 | } | ||
| 21 | }, | ||
| 22 | "legend_format": "%5.1lf" | ||
| 23 | }, | ||
| 24 | "apache_idle_workers": { | ||
| 25 | "title": "Webserver Idle Workers ({{PI}})", | ||
| 26 | "vertical": "Workers", | ||
| 27 | "legend": { | ||
| 28 | "value": { | ||
| 29 | "name": "Workers", | ||
| 30 | "color": "0000ff" | ||
| 31 | } | ||
| 32 | }, | ||
| 33 | "legend_format": "%5.1lf" | ||
| 34 | }, | ||
| 35 | "apache_requests": { | ||
| 36 | "title": "Webserver Requests ({{PI}})", | ||
| 37 | "vertical": "Requests/s", | ||
| 38 | "legend": { | ||
| 39 | "value": { | ||
| 40 | "name": "Requests/s", | ||
| 41 | "color": "0000ff" | ||
| 42 | } | ||
| 43 | }, | ||
| 44 | "legend_format": "%5.1lf" | ||
| 45 | }, | ||
| 46 | "apache_scoreboard": { | ||
| 47 | "title": "Webserver Scoreboard ({{PI}})", | ||
| 48 | "vertical": "Slots", | ||
| 49 | "type": "stacked", | ||
| 50 | "legend": { | ||
| 51 | "open": { | ||
| 52 | "name": "Open (empty)", | ||
| 53 | "color": "e0e0e0" | ||
| 54 | }, | ||
| 55 | "idle_cleanup": { | ||
| 56 | "name": "Idle cleanup", | ||
| 57 | "color": "ffff00" | ||
| 58 | }, | ||
| 59 | "finishing": { | ||
| 60 | "name": "Finishing", | ||
| 61 | "color": "008080" | ||
| 62 | }, | ||
| 63 | "logging": { | ||
| 64 | "name": "Logging", | ||
| 65 | "color": "a000a0" | ||
| 66 | }, | ||
| 67 | "closing": { | ||
| 68 | "name": "Closing", | ||
| 69 | "color": "000080" | ||
| 70 | }, | ||
| 71 | "dnslookup": { | ||
| 72 | "name": "DNS Lookup", | ||
| 73 | "color": "ff0000" | ||
| 74 | }, | ||
| 75 | "keepalive": { | ||
| 76 | "name": "Keepalive", | ||
| 77 | "color": "0080ff" | ||
| 78 | }, | ||
| 79 | "sending": { | ||
| 80 | "name": "Sending reply", | ||
| 81 | "color": "00e000" | ||
| 82 | }, | ||
| 83 | "reading": { | ||
| 84 | "name": "Reading request", | ||
| 85 | "color": "0000ff" | ||
| 86 | }, | ||
| 87 | "starting": { | ||
| 88 | "name": "Starting up", | ||
| 89 | "color": "ff00ff" | ||
| 90 | }, | ||
| 91 | "waiting": { | ||
| 92 | "name": "Waiting", | ||
| 93 | "color": "ffb000" | ||
| 94 | }, | ||
| 95 | |||
| 96 | "connect": { | ||
| 97 | "name": "Connect (empty)", | ||
| 98 | "color": "e0e0e0" | ||
| 99 | }, | ||
| 100 | "hard_error": { | ||
| 101 | "name": "Hard error", | ||
| 102 | "color": "ff0000" | ||
| 103 | }, | ||
| 104 | "close": { | ||
| 105 | "name": "Close", | ||
| 106 | "color": "008080" | ||
| 107 | }, | ||
| 108 | "response_end": { | ||
| 109 | "name": "Request end", | ||
| 110 | "color": "a000a0" | ||
| 111 | }, | ||
| 112 | "write": { | ||
| 113 | "name": "Write", | ||
| 114 | "color": "000080" | ||
| 115 | }, | ||
| 116 | "response_start": { | ||
| 117 | "name": "Response start", | ||
| 118 | "color": "ffff00" | ||
| 119 | }, | ||
| 120 | "handle_request": { | ||
| 121 | "name": "Handle request", | ||
| 122 | "color": "0080ff" | ||
| 123 | }, | ||
| 124 | "read_post": { | ||
| 125 | "name": "Read POST", | ||
| 126 | "color": "00e000" | ||
| 127 | }, | ||
| 128 | "request_end": { | ||
| 129 | "name": "Request end", | ||
| 130 | "color": "0000ff" | ||
| 131 | }, | ||
| 132 | "read": { | ||
| 133 | "name": "Read", | ||
| 134 | "color": "ff00ff" | ||
| 135 | }, | ||
| 136 | "request_start": { | ||
| 137 | "name": "Request start", | ||
| 138 | "color": "ffb000" | ||
| 139 | } | ||
| 140 | }, | ||
| 141 | "legend_format": "%5.2lf" | ||
| 142 | } | ||
| 143 | } | ||
diff --git a/plugin/apache.php b/plugin/apache.php deleted file mode 100644 index 6fa9963..0000000 --- a/plugin/apache.php +++ /dev/null | |||
| @@ -1,167 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Apache plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # apache[-X]/apache_bytes-X.rrd | ||
| 10 | # apache[-X]/apache_connections-X.rrd | ||
| 11 | # apache[-X]/apache_idle_workers-X.rrd | ||
| 12 | # apache[-X]/apache_requests-X.rrd | ||
| 13 | # apache[-X]/apache_scoreboard-X.rrd | ||
| 14 | |||
| 15 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 16 | |||
| 17 | switch ($obj->args['type']) { | ||
| 18 | case 'apache_bytes': | ||
| 19 | $obj->data_sources = array('value'); | ||
| 20 | $obj->legend = array( | ||
| 21 | 'value' => sprintf('%s/s', ucfirst($CONFIG['network_datasize'])), | ||
| 22 | ); | ||
| 23 | $obj->colors = array( | ||
| 24 | 'value' => '0000ff', | ||
| 25 | ); | ||
| 26 | $obj->rrd_title = sprintf('Webserver Traffic%s', | ||
| 27 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); | ||
| 28 | $obj->rrd_vertical = sprintf('%s/s', ucfirst($CONFIG['network_datasize'])); | ||
| 29 | $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; | ||
| 30 | break; | ||
| 31 | case 'apache_connections': | ||
| 32 | $obj->data_sources = array('value'); | ||
| 33 | $obj->legend = array( | ||
| 34 | 'value' => 'Conns/s', | ||
| 35 | ); | ||
| 36 | $obj->colors = array( | ||
| 37 | 'value' => '00b000', | ||
| 38 | ); | ||
| 39 | $obj->rrd_title = sprintf('Webserver Connections%s', | ||
| 40 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); | ||
| 41 | $obj->rrd_vertical = 'Conns/s'; | ||
| 42 | break; | ||
| 43 | case 'apache_idle_workers': | ||
| 44 | $obj->data_sources = array('value'); | ||
| 45 | $obj->legend = array( | ||
| 46 | 'value' => 'Workers', | ||
| 47 | ); | ||
| 48 | $obj->colors = array( | ||
| 49 | 'value' => '0000ff', | ||
| 50 | ); | ||
| 51 | $obj->rrd_title = sprintf('Webserver Idle Workers%s', | ||
| 52 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); | ||
| 53 | $obj->rrd_vertical = 'Workers'; | ||
| 54 | break; | ||
| 55 | case 'apache_requests': | ||
| 56 | $obj->data_sources = array('value'); | ||
| 57 | $obj->legend = array( | ||
| 58 | 'value' => 'Requests/s', | ||
| 59 | ); | ||
| 60 | $obj->colors = array( | ||
| 61 | 'value' => '00b000', | ||
| 62 | ); | ||
| 63 | $obj->rrd_title = sprintf('Webserver Requests%s', | ||
| 64 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); | ||
| 65 | $obj->rrd_vertical = 'Requests/s'; | ||
| 66 | break; | ||
| 67 | case 'apache_scoreboard': | ||
| 68 | require_once 'type/GenericStacked.class.php'; | ||
| 69 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 70 | $obj->data_sources = array('value'); | ||
| 71 | $obj->order = array( | ||
| 72 | 'open', | ||
| 73 | 'idle_cleanup', | ||
| 74 | 'finishing', | ||
| 75 | 'logging', | ||
| 76 | 'closing', | ||
| 77 | 'dnslookup', | ||
| 78 | 'keepalive', | ||
| 79 | 'sending', | ||
| 80 | 'reading', | ||
| 81 | 'starting', | ||
| 82 | 'waiting', | ||
| 83 | |||
| 84 | 'connect', | ||
| 85 | 'hard_error', | ||
| 86 | 'close', | ||
| 87 | 'response_end', | ||
| 88 | 'write', | ||
| 89 | 'response_start', | ||
| 90 | 'handle_request', | ||
| 91 | 'read_post', | ||
| 92 | 'request_end', | ||
| 93 | 'read', | ||
| 94 | 'request_start', | ||
| 95 | ); | ||
| 96 | $obj->legend = array( | ||
| 97 | 'open' => 'Open (empty)', | ||
| 98 | 'waiting' => 'Waiting', | ||
| 99 | 'starting' => 'Starting up', | ||
| 100 | 'reading' => 'Reading request', | ||
| 101 | 'sending' => 'Sending reply', | ||
| 102 | 'keepalive' => 'Keepalive', | ||
| 103 | 'dnslookup' => 'DNS Lookup', | ||
| 104 | 'closing' => 'Closing', | ||
| 105 | 'logging' => 'Logging', | ||
| 106 | 'finishing' => 'Finishing', | ||
| 107 | 'idle_cleanup' => 'Idle cleanup', | ||
| 108 | |||
| 109 | 'connect' => 'Connect (empty)', | ||
| 110 | 'close' => 'Close', | ||
| 111 | 'hard_error' => 'Hard error', | ||
| 112 | 'read' => 'Read', | ||
| 113 | 'read_post' => 'Read POST', | ||
| 114 | 'write' => 'Write', | ||
| 115 | 'handle_request' => 'Handle request', | ||
| 116 | 'request_start' => 'Request start', | ||
| 117 | 'request_end' => 'Request end', | ||
| 118 | 'response_start' => 'Response start', | ||
| 119 | 'response_end' => 'Response end', | ||
| 120 | ); | ||
| 121 | $obj->colors = array( | ||
| 122 | 'open' => 'e0e0e0', | ||
| 123 | 'waiting' => 'ffb000', | ||
| 124 | 'starting' => 'ff00ff', | ||
| 125 | 'reading' => '0000ff', | ||
| 126 | 'sending' => '00e000', | ||
| 127 | 'keepalive' => '0080ff', | ||
| 128 | 'dnslookup' => 'ff0000', | ||
| 129 | 'closing' => '000080', | ||
| 130 | 'logging' => 'a000a0', | ||
| 131 | 'finishing' => '008080', | ||
| 132 | 'idle_cleanup' => 'ffff00', | ||
| 133 | |||
| 134 | 'connect' => 'e0e0e0', | ||
| 135 | 'close' => '008080', | ||
| 136 | 'hard_error' => 'ff0000', | ||
| 137 | 'read' => 'ff00ff', | ||
| 138 | 'read_post' => '00e000', | ||
| 139 | 'write' => '000080', | ||
| 140 | 'handle_request' => '0080ff', | ||
| 141 | 'request_start' => 'ffb000', | ||
| 142 | 'request_end' => '0000ff', | ||
| 143 | 'response_start' => 'ffff00', | ||
| 144 | 'response_end' => 'a000a0', | ||
| 145 | ); | ||
| 146 | $obj->rrd_title = sprintf('Webserver Scoreboard%s', | ||
| 147 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); | ||
| 148 | $obj->rrd_vertical = 'Slots'; | ||
| 149 | break; | ||
| 150 | } | ||
| 151 | |||
| 152 | $obj->rrd_format = '%5.1lf'; | ||
| 153 | |||
| 154 | # backwards compatibility | ||
| 155 | if ($CONFIG['version'] < 5) { | ||
| 156 | $obj->data_sources = array('count'); | ||
| 157 | if (count($obj->legend) == 1) { | ||
| 158 | $obj->legend['count'] = $obj->legend['value']; | ||
| 159 | unset($obj->legend['value']); | ||
| 160 | } | ||
| 161 | if (count($obj->colors) == 1) { | ||
| 162 | $obj->colors['count'] = $obj->colors['value']; | ||
| 163 | unset($obj->colors['value']); | ||
| 164 | } | ||
| 165 | } | ||
| 166 | |||
| 167 | $obj->rrd_graph(); | ||
diff --git a/plugin/apcups.json b/plugin/apcups.json new file mode 100644 index 0000000..87ba662 --- /dev/null +++ b/plugin/apcups.json | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | { | ||
| 2 | "charge": { | ||
| 3 | "title": "UPS Charge", | ||
| 4 | "vertical": "Ampere hours", | ||
| 5 | "legend": { | ||
| 6 | "value": { | ||
| 7 | "name": "Charge", | ||
| 8 | "color": "0000f0" | ||
| 9 | } | ||
| 10 | }, | ||
| 11 | "legend_format": "%5.1lf%s" | ||
| 12 | }, | ||
| 13 | "frequency": { | ||
| 14 | "title": "UPS Input Frequency", | ||
| 15 | "vertical": "Hertz", | ||
| 16 | "legend": { | ||
| 17 | "value": { | ||
| 18 | "name": "Frequency", | ||
| 19 | "color": "0000f0" | ||
| 20 | } | ||
| 21 | }, | ||
| 22 | "legend_format": "%5.1lf%s" | ||
| 23 | }, | ||
| 24 | "percent": { | ||
| 25 | "title": "UPS Load", | ||
| 26 | "vertical": "Load", | ||
| 27 | "legend": { | ||
| 28 | "value": { | ||
| 29 | "name": "Percent", | ||
| 30 | "color": "0000f0" | ||
| 31 | } | ||
| 32 | }, | ||
| 33 | "legend_format": "%5.1lf%s" | ||
| 34 | }, | ||
| 35 | "temperature": { | ||
| 36 | "title": "UPS Temperature", | ||
| 37 | "vertical": "Celsius", | ||
| 38 | "legend": { | ||
| 39 | "value": { | ||
| 40 | "name": "Temperature", | ||
| 41 | "color": "0000f0" | ||
| 42 | } | ||
| 43 | } | ||
| 44 | }, | ||
| 45 | "timeleft": { | ||
| 46 | "title": "UPS Time Left", | ||
| 47 | "vertical": "Seconds", | ||
| 48 | "legend": { | ||
| 49 | "value": { | ||
| 50 | "name": "Time Left", | ||
| 51 | "color": "0000f0" | ||
| 52 | } | ||
| 53 | }, | ||
| 54 | "legend_format": "%5.1lf%s" | ||
| 55 | }, | ||
| 56 | "voltage": { | ||
| 57 | "title": "UPS Voltage {{TI}}", | ||
| 58 | "vertical": "Volt", | ||
| 59 | "legend": { | ||
| 60 | "value": { | ||
| 61 | "name": "Voltage", | ||
| 62 | "color": "0000f0" | ||
| 63 | } | ||
| 64 | }, | ||
| 65 | "legend_format": "%5.1lf%s" | ||
| 66 | } | ||
| 67 | } | ||
diff --git a/plugin/apcups.php b/plugin/apcups.php deleted file mode 100644 index 853f0ed..0000000 --- a/plugin/apcups.php +++ /dev/null | |||
| @@ -1,89 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd APC UPS plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # apcups/ | ||
| 10 | # apcups/charge.rrd | ||
| 11 | # apcups/frequency-input.rrd | ||
| 12 | # apcups/percent-load.rrd | ||
| 13 | # apcups/temperature.rrd | ||
| 14 | # apcups/timeleft.rrd | ||
| 15 | # apcups/voltage-battery.rrd | ||
| 16 | # apcups/voltage-input.rrd | ||
| 17 | # apcups/voltage-output.rrd | ||
| 18 | |||
| 19 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 20 | |||
| 21 | switch($obj->args['type']) { | ||
| 22 | case 'charge': | ||
| 23 | $obj->data_sources = array('value'); | ||
| 24 | $obj->legend = array('value' => 'Charge'); | ||
| 25 | $obj->colors = array('value' => '0000f0'); | ||
| 26 | $obj->rrd_title = sprintf('UPS Charge'); | ||
| 27 | $obj->rrd_vertical = 'Ampere hours'; | ||
| 28 | break; | ||
| 29 | case 'frequency': | ||
| 30 | $obj->data_sources = array('value'); | ||
| 31 | $obj->legend = array('value' => 'Input Frequency'); | ||
| 32 | $obj->colors = array('value' => '0000f0'); | ||
| 33 | $obj->rrd_title = sprintf('UPS Input Frequency'); | ||
| 34 | $obj->rrd_vertical = 'Hertz'; | ||
| 35 | break; | ||
| 36 | case 'percent': | ||
| 37 | $obj->data_sources = array('value'); | ||
| 38 | $obj->legend = array('value' => 'Load'); | ||
| 39 | $obj->colors = array('value' => '0000f0'); | ||
| 40 | $obj->rrd_title = sprintf('UPS Load'); | ||
| 41 | $obj->rrd_vertical = 'Percent'; | ||
| 42 | break; | ||
| 43 | case 'temperature': | ||
| 44 | $obj->data_sources = array('value'); | ||
| 45 | $obj->legend = array('value' => 'Temperature'); | ||
| 46 | $obj->colors = array('value' => '0000f0'); | ||
| 47 | $obj->rrd_title = sprintf('UPS Temperature'); | ||
| 48 | $obj->rrd_vertical = 'Celsius'; | ||
| 49 | break; | ||
| 50 | case 'timeleft': | ||
| 51 | $obj->data_sources = array('value'); | ||
| 52 | $obj->legend = array('value' => 'Time Left'); | ||
| 53 | $obj->colors = array('value' => '0000f0'); | ||
| 54 | $obj->rrd_title = sprintf('UPS Time Left'); | ||
| 55 | $obj->rrd_vertical = 'Seconds'; | ||
| 56 | break; | ||
| 57 | case 'voltage': | ||
| 58 | $obj->order = array('battery', 'input', 'output'); | ||
| 59 | $obj->legend = array( | ||
| 60 | 'battery' => 'Battery Voltage', | ||
| 61 | 'input' => 'Input Voltage', | ||
| 62 | 'output' => 'Output Voltage' | ||
| 63 | ); | ||
| 64 | $obj->colors = array( | ||
| 65 | 'battery' => '0000f0', | ||
| 66 | 'input' => '00f000', | ||
| 67 | 'output' => 'f00000' | ||
| 68 | ); | ||
| 69 | $obj->rrd_title = sprintf('UPS Voltage'); | ||
| 70 | $obj->rrd_vertical = 'Volt'; | ||
| 71 | break; | ||
| 72 | } | ||
| 73 | $obj->rrd_format = '%5.1lf%s'; | ||
| 74 | |||
| 75 | # backwards compatibility | ||
| 76 | if ($CONFIG['version'] < 5 && | ||
| 77 | in_array($obj->args['type'], array('frequency', 'percent', 'timeleft'))) { | ||
| 78 | |||
| 79 | $obj->data_sources = array($obj->args['type']); | ||
| 80 | |||
| 81 | $obj->legend[$obj->args['type']] = $obj->legend['value']; | ||
| 82 | unset($obj->legend['value']); | ||
| 83 | |||
| 84 | $obj->colors[$obj->args['type']] = $obj->colors['value']; | ||
| 85 | unset($obj->colors['value']); | ||
| 86 | } | ||
| 87 | |||
| 88 | $obj->rrd_graph(); | ||
| 89 | |||
diff --git a/plugin/battery.json b/plugin/battery.json new file mode 100644 index 0000000..625e704 --- /dev/null +++ b/plugin/battery.json | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | { | ||
| 2 | "charge": { | ||
| 3 | "title": "Charge (Battery {{PI}})", | ||
| 4 | "vertical": "Ampere hours", | ||
| 5 | "legend": { | ||
| 6 | "value": { | ||
| 7 | "name": "Charge", | ||
| 8 | "color": "0000f0" | ||
| 9 | } | ||
| 10 | }, | ||
| 11 | "legend_format": "%5.1lf%s" | ||
| 12 | }, | ||
| 13 | "current": { | ||
| 14 | "title": "Current (Battery {{PI}})", | ||
| 15 | "vertical": "Ampere", | ||
| 16 | "legend": { | ||
| 17 | "value": { | ||
| 18 | "name": "Current", | ||
| 19 | "color": "0000f0" | ||
| 20 | } | ||
| 21 | }, | ||
| 22 | "legend_format": "%5.1lf%s" | ||
| 23 | }, | ||
| 24 | "voltage": { | ||
| 25 | "title": "Voltage (Battery {{PI}})", | ||
| 26 | "vertical": "Volt", | ||
| 27 | "legend": { | ||
| 28 | "value": { | ||
| 29 | "name": "Voltage", | ||
| 30 | "color": "0000f0" | ||
| 31 | } | ||
| 32 | }, | ||
| 33 | "legend_format": "%5.1lf%s" | ||
| 34 | } | ||
| 35 | } | ||
diff --git a/plugin/battery.php b/plugin/battery.php deleted file mode 100644 index fc91955..0000000 --- a/plugin/battery.php +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Battery plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # battery-X/ | ||
| 10 | # battery-X/charge.rrd | ||
| 11 | # battery-X/current.rrd | ||
| 12 | # battery-X/voltage.rrd | ||
| 13 | |||
| 14 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 15 | $obj->colors = array( | ||
| 16 | 'value' => '0000f0', | ||
| 17 | ); | ||
| 18 | switch($obj->args['type']) { | ||
| 19 | case 'charge': | ||
| 20 | $obj->legend = array('value' => 'Charge'); | ||
| 21 | $obj->rrd_title = sprintf('Charge (Battery %s)', $obj->args['pinstance']); | ||
| 22 | $obj->rrd_vertical = 'Ampere hours'; | ||
| 23 | break; | ||
| 24 | case 'current': | ||
| 25 | $obj->legend = array('value' => 'Current'); | ||
| 26 | $obj->rrd_title = sprintf('Current (Battery %s)', $obj->args['pinstance']); | ||
| 27 | $obj->rrd_vertical = 'Ampere'; | ||
| 28 | break; | ||
| 29 | case 'voltage': | ||
| 30 | $obj->legend = array('value' => 'Voltage'); | ||
| 31 | $obj->rrd_title = sprintf('Voltage (Battery %s)', $obj->args['pinstance']); | ||
| 32 | $obj->rrd_vertical = 'Volt'; | ||
| 33 | break; | ||
| 34 | } | ||
| 35 | $obj->rrd_format = '%4.1lf'; | ||
| 36 | |||
| 37 | $obj->rrd_graph(); | ||
| 38 | |||
diff --git a/plugin/bind.php b/plugin/bind.php deleted file mode 100644 index cfbd4c6..0000000 --- a/plugin/bind.php +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd bind plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | |||
| 9 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 10 | |||
| 11 | $obj->rrd_title = sprintf('%s/%s', $obj->args['pinstance'], $obj->args['type']); | ||
| 12 | $obj->rrd_format = '%5.1lf%s'; | ||
| 13 | |||
| 14 | $obj->rrd_graph(); | ||
diff --git a/plugin/conntrack.json b/plugin/conntrack.json new file mode 100644 index 0000000..d3e218e --- /dev/null +++ b/plugin/conntrack.json | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | { | ||
| 2 | "conntrack": { | ||
| 3 | "title": "Conntrack entries", | ||
| 4 | "vertical": "Entries", | ||
| 5 | "legend": { | ||
| 6 | "value": { | ||
| 7 | "name": "Entries", | ||
| 8 | "color": "0000f0" | ||
| 9 | } | ||
| 10 | }, | ||
| 11 | "legend_format": "%.1lf" | ||
| 12 | } | ||
| 13 | } | ||
diff --git a/plugin/conntrack.php b/plugin/conntrack.php deleted file mode 100644 index efd562c..0000000 --- a/plugin/conntrack.php +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Conntrack plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # conntrack/conntrack.rrd | ||
| 10 | |||
| 11 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 12 | $obj->data_sources = array('value'); | ||
| 13 | $obj->legend = array( | ||
| 14 | 'value' => 'Conntrack entries', | ||
| 15 | ); | ||
| 16 | $obj->colors = array( | ||
| 17 | 'value' => '0000f0', | ||
| 18 | ); | ||
| 19 | $obj->rrd_title = 'Conntrack entries'; | ||
| 20 | $obj->rrd_vertical = '#'; | ||
| 21 | $obj->rrd_format = '%.1lf'; | ||
| 22 | |||
| 23 | # backwards compatibility | ||
| 24 | # the data source is named 'entropy' in collectd's types.db | ||
| 25 | if ($CONFIG['version'] < 5) { | ||
| 26 | $obj->data_sources = array('entropy'); | ||
| 27 | |||
| 28 | $obj->legend['entropy'] = $obj->legend['value']; | ||
| 29 | unset($obj->legend['value']); | ||
| 30 | |||
| 31 | $obj->colors['entropy'] = $obj->colors['value']; | ||
| 32 | unset($obj->colors['value']); | ||
| 33 | } | ||
| 34 | |||
| 35 | $obj->rrd_graph(); | ||
diff --git a/plugin/contextswitch.json b/plugin/contextswitch.json new file mode 100644 index 0000000..65c3745 --- /dev/null +++ b/plugin/contextswitch.json | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | { | ||
| 2 | "contextswitch": { | ||
| 3 | "title": "Context switches", | ||
| 4 | "vertical": "switch per second Bits", | ||
| 5 | "legend": { | ||
| 6 | "value": { | ||
| 7 | "name": "Switches", | ||
| 8 | "color": "0000f0" | ||
| 9 | } | ||
| 10 | }, | ||
| 11 | "legend_format": "%4.0lf" | ||
| 12 | } | ||
| 13 | } | ||
diff --git a/plugin/contextswitch.php b/plugin/contextswitch.php deleted file mode 100644 index 24ba7f2..0000000 --- a/plugin/contextswitch.php +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd contextswitch plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # contextswitch/contextswitch.rrd | ||
| 10 | |||
| 11 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 12 | $obj->data_sources = array('value'); | ||
| 13 | $obj->legend = array( | ||
| 14 | 'value' => 'Context switches', | ||
| 15 | ); | ||
| 16 | $obj->colors = array( | ||
| 17 | 'value' => '0000f0', | ||
| 18 | ); | ||
| 19 | $obj->rrd_title = 'Context switches'; | ||
| 20 | $obj->rrd_vertical = 'switch per second Bits'; | ||
| 21 | $obj->rrd_format = '%4.0lf'; | ||
| 22 | |||
| 23 | # backwards compatibility | ||
| 24 | if ($CONFIG['version'] < 5) { | ||
| 25 | $obj->data_sources = array('contextswitches'); | ||
| 26 | |||
| 27 | $obj->legend['contextswitches'] = $obj->legend['value']; | ||
| 28 | unset($obj->legend['value']); | ||
| 29 | |||
| 30 | $obj->colors['contextswitches'] = $obj->colors['value']; | ||
| 31 | unset($obj->colors['value']); | ||
| 32 | } | ||
| 33 | |||
| 34 | $obj->rrd_graph(); | ||
diff --git a/plugin/cpu.json b/plugin/cpu.json new file mode 100644 index 0000000..50254f8 --- /dev/null +++ b/plugin/cpu.json | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | { | ||
| 2 | "cpu": { | ||
| 3 | "title": "CPU-{{PI}} usage", | ||
| 4 | "vertical": "Jiffies", | ||
| 5 | "rrdtool_opts": "-u 100", | ||
| 6 | "type": "stacked", | ||
| 7 | "legend": { | ||
| 8 | "idle": { | ||
| 9 | "name": "Idle", | ||
| 10 | "color": "e8e8e8" | ||
| 11 | }, | ||
| 12 | "nice": { | ||
| 13 | "name": "Nice", | ||
| 14 | "color": "00e000" | ||
| 15 | }, | ||
| 16 | "user": { | ||
| 17 | "name": "User", | ||
| 18 | "color": "0000ff" | ||
| 19 | }, | ||
| 20 | "wait": { | ||
| 21 | "name": "Wait-IO", | ||
| 22 | "color": "ffb000" | ||
| 23 | }, | ||
| 24 | "system": { | ||
| 25 | "name": "System", | ||
| 26 | "color": "ff0000" | ||
| 27 | }, | ||
| 28 | "softirq": { | ||
| 29 | "name": "SoftIRQ", | ||
| 30 | "color": "ff00ff" | ||
| 31 | }, | ||
| 32 | "interrupt": { | ||
| 33 | "name": "IRQ", | ||
| 34 | "color": "a000a0" | ||
| 35 | }, | ||
| 36 | "steal": { | ||
| 37 | "name": "Steal", | ||
| 38 | "color": "000000" | ||
| 39 | } | ||
| 40 | }, | ||
| 41 | "legend_format": "%5.2lf" | ||
| 42 | } | ||
| 43 | } | ||
diff --git a/plugin/cpu.php b/plugin/cpu.php deleted file mode 100644 index 2965c9e..0000000 --- a/plugin/cpu.php +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd CPU plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # cpu-X/ | ||
| 10 | # cpu-X/cpu-idle.rrd | ||
| 11 | # cpu-X/cpu-interrupt.rrd | ||
| 12 | # cpu-X/cpu-nice.rrd | ||
| 13 | # cpu-X/cpu-softirq.rrd | ||
| 14 | # cpu-X/cpu-steal.rrd | ||
| 15 | # cpu-X/cpu-system.rrd | ||
| 16 | # cpu-X/cpu-user.rrd | ||
| 17 | # cpu-X/cpu-wait.rrd | ||
| 18 | |||
| 19 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 20 | $obj->data_sources = array('value'); | ||
| 21 | $obj->order = array('idle', 'nice', 'user', 'wait', 'system', 'softirq', 'interrupt', 'steal'); | ||
| 22 | $obj->legend = array( | ||
| 23 | 'idle' => 'Idle', | ||
| 24 | 'nice' => 'Nice', | ||
| 25 | 'user' => 'User', | ||
| 26 | 'wait' => 'Wait-IO', | ||
| 27 | 'system' => 'System', | ||
| 28 | 'softirq' => 'SoftIRQ', | ||
| 29 | 'interrupt' => 'IRQ', | ||
| 30 | 'steal' => 'Steal', | ||
| 31 | ); | ||
| 32 | $obj->colors = array( | ||
| 33 | 'idle' => 'e8e8e8', | ||
| 34 | 'nice' => '00e000', | ||
| 35 | 'user' => '0000ff', | ||
| 36 | 'wait' => 'ffb000', | ||
| 37 | 'system' => 'ff0000', | ||
| 38 | 'softirq' => 'ff00ff', | ||
| 39 | 'interrupt' => 'a000a0', | ||
| 40 | 'steal' => '000000', | ||
| 41 | ); | ||
| 42 | |||
| 43 | $obj->rrd_title = sprintf('CPU-%s usage', $obj->args['pinstance']); | ||
| 44 | $obj->rrd_vertical = 'Jiffies'; | ||
| 45 | $obj->rrd_format = '%5.2lf'; | ||
| 46 | $obj->rrdtool_opts .= ' -u 100'; | ||
| 47 | |||
| 48 | $obj->rrd_graph(); | ||
diff --git a/plugin/cpufreq.json b/plugin/cpufreq.json new file mode 100644 index 0000000..c66f924 --- /dev/null +++ b/plugin/cpufreq.json | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | { | ||
| 2 | "cpufreq": { | ||
| 3 | "title": "CPU frequency scaling", | ||
| 4 | "vertical": "Hz", | ||
| 5 | "legend_format": "%5.1lf%s" | ||
| 6 | } | ||
| 7 | } | ||
diff --git a/plugin/cpufreq.php b/plugin/cpufreq.php deleted file mode 100644 index d9542d1..0000000 --- a/plugin/cpufreq.php +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd CPUfreq plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # cpufreq/cpufreq-X.rrd | ||
| 10 | |||
| 11 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 12 | $obj->data_sources = array('value'); | ||
| 13 | $obj->rrd_title = 'CPU frequency scaling'; | ||
| 14 | $obj->rrd_vertical = 'Hz'; | ||
| 15 | $obj->rrd_format = '%5.1lf%s'; | ||
| 16 | |||
| 17 | $obj->rrd_graph(); | ||
diff --git a/plugin/dbi.php b/plugin/dbi.php deleted file mode 100644 index b9dd268..0000000 --- a/plugin/dbi.php +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd dbi plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | |||
| 9 | |||
| 10 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 11 | |||
| 12 | |||
| 13 | $obj->rrd_title = sprintf('%s', $obj->args['pinstance'], $obj->args['type']); | ||
| 14 | $obj->rrd_format = '%5.1lf%s'; | ||
| 15 | |||
| 16 | $obj->rrd_graph(); | ||
diff --git a/plugin/df.json b/plugin/df.json new file mode 100644 index 0000000..8820b89 --- /dev/null +++ b/plugin/df.json | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | { | ||
| 2 | "df_complex": { | ||
| 3 | "title": "Free space ({{PI}})", | ||
| 4 | "vertical": "Bytes", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend": { | ||
| 7 | "reserved": { | ||
| 8 | "name": "Reserved", | ||
| 9 | "color": "aaaaaa" | ||
| 10 | }, | ||
| 11 | "free": { | ||
| 12 | "name": "Free", | ||
| 13 | "color": "00ff00" | ||
| 14 | }, | ||
| 15 | "used": { | ||
| 16 | "name": "Used", | ||
| 17 | "color": "ff0000" | ||
| 18 | } | ||
| 19 | }, | ||
| 20 | "legend_format": "%5.1lf%sB" | ||
| 21 | }, | ||
| 22 | "df_inodes": { | ||
| 23 | "title": "Free inodes ({{PI}})", | ||
| 24 | "vertical": "Inodes", | ||
| 25 | "type": "stacked", | ||
| 26 | "legend": { | ||
| 27 | "reserved": { | ||
| 28 | "name": "Reserved", | ||
| 29 | "color": "aaaaaa" | ||
| 30 | }, | ||
| 31 | "free": { | ||
| 32 | "name": "Free", | ||
| 33 | "color": "00ff00" | ||
| 34 | }, | ||
| 35 | "used": { | ||
| 36 | "name": "Used", | ||
| 37 | "color": "ff0000" | ||
| 38 | } | ||
| 39 | }, | ||
| 40 | "legend_format": "%5.1lf%s" | ||
| 41 | } | ||
| 42 | } | ||
diff --git a/plugin/df.php b/plugin/df.php deleted file mode 100644 index 2c0dfd8..0000000 --- a/plugin/df.php +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Df plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | # LAYOUT | ||
| 9 | # | ||
| 10 | # df-X/df_complex-free.rrd | ||
| 11 | # df-X/df_complex-reserved.rrd | ||
| 12 | # df-X/df_complex-used.rrd | ||
| 13 | |||
| 14 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 15 | $obj->data_sources = array('value'); | ||
| 16 | $obj->order = array('reserved', 'free', 'used'); | ||
| 17 | $obj->legend = array( | ||
| 18 | 'reserved' => 'Reserved', | ||
| 19 | 'free' => 'Free', | ||
| 20 | 'used' => 'Used', | ||
| 21 | ); | ||
| 22 | $obj->colors = array( | ||
| 23 | 'reserved' => 'aaaaaa', | ||
| 24 | 'free' => '00ff00', | ||
| 25 | 'used' => 'ff0000', | ||
| 26 | ); | ||
| 27 | |||
| 28 | switch($obj->args['type']) { | ||
| 29 | case 'df_complex': | ||
| 30 | default: | ||
| 31 | $obj->rrd_title = sprintf('Free space (%s)', $obj->args['pinstance']); | ||
| 32 | $obj->rrd_vertical = 'Bytes'; | ||
| 33 | $obj->rrd_format = '%5.1lf%sB'; | ||
| 34 | break; | ||
| 35 | case 'df_inodes': | ||
| 36 | $obj->rrd_title = sprintf('Free inodes (%s)', $obj->args['pinstance']); | ||
| 37 | $obj->rrd_vertical = 'Inodes'; | ||
| 38 | $obj->rrd_format = '%5.1lf%s'; | ||
| 39 | break; | ||
| 40 | } | ||
| 41 | |||
| 42 | # backwards compatibility | ||
| 43 | if ($CONFIG['version'] < 5) { | ||
| 44 | $obj->data_sources = array('free', 'used'); | ||
| 45 | $obj->rrd_title = sprintf('Free space (%s)', $obj->args['tinstance']); | ||
| 46 | } | ||
| 47 | |||
| 48 | $obj->rrd_graph(); | ||
diff --git a/plugin/disk.json b/plugin/disk.json new file mode 100644 index 0000000..2d14715 --- /dev/null +++ b/plugin/disk.json | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | { | ||
| 2 | "disk_merged": { | ||
| 3 | "title": "Disk Merged Operations ({{PI}})", | ||
| 4 | "vertical": "Merged operations/s", | ||
| 5 | "type": "io", | ||
| 6 | "legend": { | ||
| 7 | "read": { | ||
| 8 | "name": "Read", | ||
| 9 | "color": "0000ff" | ||
| 10 | }, | ||
| 11 | "write": { | ||
| 12 | "name": "Write", | ||
| 13 | "color": "00b000" | ||
| 14 | } | ||
| 15 | }, | ||
| 16 | "legend_format": "%5.1lf%s" | ||
| 17 | }, | ||
| 18 | "disk_octets": { | ||
| 19 | "title": "Disk Traffic ({{PI}})", | ||
| 20 | "vertical": "Bytes per second", | ||
| 21 | "type": "io", | ||
| 22 | "legend": { | ||
| 23 | "read": { | ||
| 24 | "name": "Read", | ||
| 25 | "color": "0000ff" | ||
| 26 | }, | ||
| 27 | "write": { | ||
| 28 | "name": "Write", | ||
| 29 | "color": "00b000" | ||
| 30 | } | ||
| 31 | }, | ||
| 32 | "legend_format": "%5.1lf%s" | ||
| 33 | }, | ||
| 34 | "disk_ops": { | ||
| 35 | "title": "Disk Operations ({{PI}})", | ||
| 36 | "vertical": "Ops per second", | ||
| 37 | "type": "io", | ||
| 38 | "legend": { | ||
| 39 | "read": { | ||
| 40 | "name": "Read", | ||
| 41 | "color": "0000ff" | ||
| 42 | }, | ||
| 43 | "write": { | ||
| 44 | "name": "Write", | ||
| 45 | "color": "00b000" | ||
| 46 | } | ||
| 47 | }, | ||
| 48 | "legend_format": "%5.1lf%s" | ||
| 49 | }, | ||
| 50 | "disk_time": { | ||
| 51 | "title": "Disk time per operation ({{PI}})", | ||
| 52 | "vertical": "Avg. Time/Op", | ||
| 53 | "type": "io", | ||
| 54 | "legend": { | ||
| 55 | "read": { | ||
| 56 | "name": "Read", | ||
| 57 | "color": "0000ff" | ||
| 58 | }, | ||
| 59 | "write": { | ||
| 60 | "name": "Write", | ||
| 61 | "color": "00b000" | ||
| 62 | } | ||
| 63 | }, | ||
| 64 | "legend_format": "%5.1lf%ss", | ||
| 65 | "scale": 0.001 | ||
| 66 | } | ||
| 67 | } | ||
diff --git a/plugin/disk.php b/plugin/disk.php deleted file mode 100644 index 28f5eac..0000000 --- a/plugin/disk.php +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Disk plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericIO.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # disk-XXXX/ | ||
| 10 | # disk-XXXX/disk_merged.rrd | ||
| 11 | # disk-XXXX/disk_octets.rrd | ||
| 12 | # disk-XXXX/disk_ops.rrd | ||
| 13 | # disk-XXXX/disk_time.rrd | ||
| 14 | |||
| 15 | $obj = new Type_GenericIO($CONFIG, $_GET); | ||
| 16 | $obj->data_sources = array('read', 'write'); | ||
| 17 | $obj->legend = array( | ||
| 18 | 'read' => 'Read', | ||
| 19 | 'write' => 'Written', | ||
| 20 | ); | ||
| 21 | $obj->colors = array( | ||
| 22 | 'read' => '0000ff', | ||
| 23 | 'write' => '00b000', | ||
| 24 | ); | ||
| 25 | switch($obj->args['type']) { | ||
| 26 | case 'disk_merged': | ||
| 27 | $obj->rrd_title = sprintf('Disk Merged Operations (%s)', $obj->args['pinstance']); | ||
| 28 | $obj->rrd_vertical = 'Merged operations/s'; | ||
| 29 | $obj->rrd_format = '%5.1lf%s'; | ||
| 30 | break; | ||
| 31 | case 'disk_octets': | ||
| 32 | $obj->rrd_title = sprintf('Disk Traffic (%s)', $obj->args['pinstance']); | ||
| 33 | $obj->rrd_vertical = 'Bytes per second'; | ||
| 34 | $obj->rrd_format = '%5.1lf%s'; | ||
| 35 | break; | ||
| 36 | case 'disk_ops': | ||
| 37 | $obj->rrd_title = sprintf('Disk Operations (%s)', $obj->args['pinstance']); | ||
| 38 | $obj->rrd_vertical = 'Ops per second'; | ||
| 39 | $obj->rrd_format = '%5.1lf%s'; | ||
| 40 | break; | ||
| 41 | case 'disk_time': | ||
| 42 | $obj->rrd_title = sprintf('Disk time per operation (%s)', $obj->args['pinstance']); | ||
| 43 | $obj->rrd_vertical = 'Avg. Time/Op'; | ||
| 44 | $obj->rrd_format = '%5.1lf%ss'; | ||
| 45 | $obj->scale = '0.001'; | ||
| 46 | break; | ||
| 47 | } | ||
| 48 | |||
| 49 | $obj->rrd_graph(); | ||
diff --git a/plugin/dns.json b/plugin/dns.json new file mode 100644 index 0000000..6f8c542 --- /dev/null +++ b/plugin/dns.json | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | { | ||
| 2 | "dns_octets": { | ||
| 3 | "title": "DNS traffic", | ||
| 4 | "vertical": "Bit/s", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend": { | ||
| 7 | "queries": { | ||
| 8 | "name": "Queries", | ||
| 9 | "color": "0000ff" | ||
| 10 | }, | ||
| 11 | "responses": { | ||
| 12 | "name": "Responses", | ||
| 13 | "color": "00ff00" | ||
| 14 | } | ||
| 15 | } | ||
| 16 | }, | ||
| 17 | "dns_opcode": { | ||
| 18 | "title": "DNS Opcode Query", | ||
| 19 | "vertical": "Queries/s", | ||
| 20 | "type": "stacked" | ||
| 21 | }, | ||
| 22 | "dns_qtype": { | ||
| 23 | "title": "DNS QType", | ||
| 24 | "vertical": "Queries/s", | ||
| 25 | "type": "stacked" | ||
| 26 | }, | ||
| 27 | "dns_rcode": { | ||
| 28 | "title": "DNS Reply code", | ||
| 29 | "vertical": "Queries/s", | ||
| 30 | "type": "stacked" | ||
| 31 | } | ||
| 32 | } | ||
diff --git a/plugin/dns.php b/plugin/dns.php deleted file mode 100644 index 0c44097..0000000 --- a/plugin/dns.php +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd DNS plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # dns/ | ||
| 10 | # dns/dns_octets.rrd | ||
| 11 | # dns/dns_opcode-X.rrd | ||
| 12 | # dns/dns_qtype-X.rrd | ||
| 13 | |||
| 14 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 15 | $obj->rrd_format = '%5.1lf%s'; | ||
| 16 | |||
| 17 | switch($obj->args['type']) { | ||
| 18 | case 'dns_octets': | ||
| 19 | $obj->data_sources = array( | ||
| 20 | 'queries', | ||
| 21 | 'responses', | ||
| 22 | ); | ||
| 23 | $obj->legend = array( | ||
| 24 | 'queries' => 'Queries', | ||
| 25 | 'responses' => 'Responses', | ||
| 26 | ); | ||
| 27 | $obj->colors = array( | ||
| 28 | 'queries' => '0000ff', | ||
| 29 | 'responses' => '00ff00', | ||
| 30 | ); | ||
| 31 | $obj->rrd_title = 'DNS traffic'; | ||
| 32 | $obj->rrd_vertical = 'Bit/s'; | ||
| 33 | break; | ||
| 34 | case 'dns_opcode': | ||
| 35 | $obj->data_sources = array('value'); | ||
| 36 | $obj->rrd_title = 'DNS Opcode Query'; | ||
| 37 | $obj->rrd_vertical = 'Queries/s'; | ||
| 38 | break; | ||
| 39 | case 'dns_qtype': | ||
| 40 | $obj->data_sources = array('value'); | ||
| 41 | $obj->rrd_title = 'DNS QType'; | ||
| 42 | $obj->rrd_vertical = 'Queries/s'; | ||
| 43 | break; | ||
| 44 | case 'dns_rcode': | ||
| 45 | $obj->data_sources = array('value'); | ||
| 46 | $obj->rrd_title = 'DNS Reply code'; | ||
| 47 | $obj->rrd_vertical = 'Queries/s'; | ||
| 48 | break; | ||
| 49 | } | ||
| 50 | |||
| 51 | $obj->rrd_graph(); | ||
diff --git a/plugin/entropy.json b/plugin/entropy.json new file mode 100644 index 0000000..dc0171d --- /dev/null +++ b/plugin/entropy.json | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | { | ||
| 2 | "entropy": { | ||
| 3 | "title": "Available entropy", | ||
| 4 | "vertical": "Bits", | ||
| 5 | "legend": { | ||
| 6 | "value": { | ||
| 7 | "name": "Entropy bits", | ||
| 8 | "color": "0000f0" | ||
| 9 | } | ||
| 10 | }, | ||
| 11 | "legend_format": "%4.0lf" | ||
| 12 | } | ||
| 13 | } | ||
diff --git a/plugin/entropy.php b/plugin/entropy.php deleted file mode 100644 index 0170335..0000000 --- a/plugin/entropy.php +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Entropy plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # entropy/entropy.rrd | ||
| 10 | |||
| 11 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 12 | $obj->data_sources = array('value'); | ||
| 13 | $obj->legend = array( | ||
| 14 | 'value' => 'Entropy bits', | ||
| 15 | ); | ||
| 16 | $obj->colors = array( | ||
| 17 | 'value' => '0000f0', | ||
| 18 | ); | ||
| 19 | $obj->rrd_title = 'Available entropy'; | ||
| 20 | $obj->rrd_vertical = 'Bits'; | ||
| 21 | $obj->rrd_format = '%4.0lf'; | ||
| 22 | |||
| 23 | # backwards compatibility | ||
| 24 | if ($CONFIG['version'] < 5) { | ||
| 25 | $obj->data_sources = array('entropy'); | ||
| 26 | |||
| 27 | $obj->legend['entropy'] = $obj->legend['value']; | ||
| 28 | unset($obj->legend['value']); | ||
| 29 | |||
| 30 | $obj->colors['entropy'] = $obj->colors['value']; | ||
| 31 | unset($obj->colors['value']); | ||
| 32 | } | ||
| 33 | |||
| 34 | $obj->rrd_graph(); | ||
diff --git a/plugin/filecount.json b/plugin/filecount.json new file mode 100644 index 0000000..b32fbdd --- /dev/null +++ b/plugin/filecount.json | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | { | ||
| 2 | "bytes": { | ||
| 3 | "title": "Filecount: size ({{PI}})", | ||
| 4 | "vertical": "Bytes", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend": { | ||
| 7 | "value": { | ||
| 8 | "name": "Size", | ||
| 9 | "color": "0000ff" | ||
| 10 | } | ||
| 11 | }, | ||
| 12 | "legend_format": "%5.1lf%s" | ||
| 13 | }, | ||
| 14 | "files": { | ||
| 15 | "title": "Filecount: number of files ({{PI}})", | ||
| 16 | "vertical": "Files", | ||
| 17 | "type": "stacked", | ||
| 18 | "legend": { | ||
| 19 | "value": { | ||
| 20 | "name": "Files", | ||
| 21 | "color": "f0a000" | ||
| 22 | } | ||
| 23 | }, | ||
| 24 | "legend_format": "%5.1lf%s" | ||
| 25 | } | ||
| 26 | } | ||
diff --git a/plugin/filecount.php b/plugin/filecount.php deleted file mode 100644 index ead8df8..0000000 --- a/plugin/filecount.php +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd filecount plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # filecount-X/ | ||
| 10 | # filecount-X/bytes.rrd | ||
| 11 | # filecount-X/files.rrd | ||
| 12 | |||
| 13 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 14 | |||
| 15 | $obj->rrd_format = '%5.1lf%s'; | ||
| 16 | $obj->data_sources = array('value'); | ||
| 17 | |||
| 18 | switch($obj->args['type']) { | ||
| 19 | case 'bytes': | ||
| 20 | $obj->legend = array('value' => 'Size'); | ||
| 21 | $obj->colors = array('value' => '0000ff'); | ||
| 22 | $obj->rrd_title = sprintf('Filecount: size (%s)', $obj->args['pinstance']); | ||
| 23 | $obj->rrd_vertical = 'Bytes'; | ||
| 24 | break; | ||
| 25 | case 'files': | ||
| 26 | $obj->legend = array('value' => 'Files'); | ||
| 27 | $obj->colors = array('value' => 'f0a000'); | ||
| 28 | $obj->rrd_title = sprintf('Filecount: number of files (%s)', $obj->args['pinstance']); | ||
| 29 | $obj->rrd_vertical = 'Files'; | ||
| 30 | break; | ||
| 31 | } | ||
| 32 | |||
| 33 | $obj->rrd_graph(); | ||
diff --git a/plugin/hddtemp.json b/plugin/hddtemp.json new file mode 100644 index 0000000..20b8d61 --- /dev/null +++ b/plugin/hddtemp.json | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | { | ||
| 2 | "temperature": { | ||
| 3 | "title": "HDD Temperature", | ||
| 4 | "vertical": "°C", | ||
| 5 | "legend_format": "%5.1lf%s" | ||
| 6 | } | ||
| 7 | } | ||
diff --git a/plugin/hddtemp.php b/plugin/hddtemp.php deleted file mode 100644 index 9e88b6a..0000000 --- a/plugin/hddtemp.php +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd HDDTemp plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # hddtemp/temperature-<disk>.rrd | ||
| 10 | |||
| 11 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 12 | $obj->legend = array('temperature' => 'Temperature'); | ||
| 13 | $obj->rrd_title = 'HDD Temperature'; | ||
| 14 | $obj->rrd_vertical = '°C'; | ||
| 15 | $obj->rrd_format = '%.1lf'; | ||
| 16 | |||
| 17 | $obj->rrd_graph(); | ||
diff --git a/plugin/interface.json b/plugin/interface.json new file mode 100644 index 0000000..9b23049 --- /dev/null +++ b/plugin/interface.json | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | { | ||
| 2 | "if_octets": { | ||
| 3 | "title": "Interface Traffic ({{PI}})", | ||
| 4 | "vertical": "{{ND}} per second", | ||
| 5 | "type": "io", | ||
| 6 | "legend": { | ||
| 7 | "rx": { | ||
| 8 | "name": "Receive", | ||
| 9 | "color": "0000ff" | ||
| 10 | }, | ||
| 11 | "tx": { | ||
| 12 | "name": "Transmit", | ||
| 13 | "color": "00b000" | ||
| 14 | } | ||
| 15 | }, | ||
| 16 | "legend_format": "%5.1lf%s", | ||
| 17 | "datasize": true | ||
| 18 | }, | ||
| 19 | "if_errors": { | ||
| 20 | "title": "Interface Errors ({{PI}})", | ||
| 21 | "vertical": "Errors per second", | ||
| 22 | "type": "io", | ||
| 23 | "legend": { | ||
| 24 | "rx": { | ||
| 25 | "name": "Receive", | ||
| 26 | "color": "0000ff" | ||
| 27 | }, | ||
| 28 | "tx": { | ||
| 29 | "name": "Transmit", | ||
| 30 | "color": "00b000" | ||
| 31 | } | ||
| 32 | }, | ||
| 33 | "legend_format": "%5.1lf%s" | ||
| 34 | }, | ||
| 35 | "if_packets": { | ||
| 36 | "title": "Interface Packets ({{PI}})", | ||
| 37 | "vertical": "Packets per second", | ||
| 38 | "type": "io", | ||
| 39 | "legend": { | ||
| 40 | "rx": { | ||
| 41 | "name": "Receive", | ||
| 42 | "color": "0000ff" | ||
| 43 | }, | ||
| 44 | "tx": { | ||
| 45 | "name": "Transmit", | ||
| 46 | "color": "00b000" | ||
| 47 | } | ||
| 48 | }, | ||
| 49 | "legend_format": "%5.1lf%s" | ||
| 50 | } | ||
| 51 | } | ||
diff --git a/plugin/interface.php b/plugin/interface.php deleted file mode 100644 index 5728c07..0000000 --- a/plugin/interface.php +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Interface plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericIO.class.php'; | ||
| 7 | |||
| 8 | # LAYOUT - Collectd 4 | ||
| 9 | # interface/ | ||
| 10 | # interface/if_errors-XXXX.rrd | ||
| 11 | # interface/if_octets-XXXX.rrd | ||
| 12 | # interface/if_packets-XXXX.rrd | ||
| 13 | |||
| 14 | # LAYOUT - Collectd 5 | ||
| 15 | # interface-XXXX/if_errors.rrd | ||
| 16 | # interface-XXXX/if_octets.rrd | ||
| 17 | # interface-XXXX/if_packets.rrd | ||
| 18 | |||
| 19 | $obj = new Type_GenericIO($CONFIG, $_GET); | ||
| 20 | $obj->data_sources = array('rx', 'tx'); | ||
| 21 | $obj->legend = array( | ||
| 22 | 'rx' => 'Receive', | ||
| 23 | 'tx' => 'Transmit', | ||
| 24 | ); | ||
| 25 | $obj->colors = array( | ||
| 26 | 'rx' => '0000ff', | ||
| 27 | 'tx' => '00b000', | ||
| 28 | ); | ||
| 29 | $obj->rrd_format = '%5.1lf%s'; | ||
| 30 | |||
| 31 | $instance = $CONFIG['version'] < 5 ? 'tinstance' : 'pinstance'; | ||
| 32 | switch($obj->args['type']) { | ||
| 33 | case 'if_errors': | ||
| 34 | $obj->rrd_title = sprintf('Interface Errors (%s)', $obj->args[$instance]); | ||
| 35 | $obj->rrd_vertical = 'Errors per second'; | ||
| 36 | break; | ||
| 37 | case 'if_octets': | ||
| 38 | $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args[$instance]); | ||
| 39 | $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize'])); | ||
| 40 | $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; | ||
| 41 | break; | ||
| 42 | case 'if_packets': | ||
| 43 | $obj->rrd_title = sprintf('Interface Packets (%s)', $obj->args[$instance]); | ||
| 44 | $obj->rrd_vertical = 'Packets per second'; | ||
| 45 | break; | ||
| 46 | } | ||
| 47 | |||
| 48 | $obj->rrd_graph(); | ||
diff --git a/plugin/ip6tables.php b/plugin/ip6tables.php deleted file mode 100644 index 090c475..0000000 --- a/plugin/ip6tables.php +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd IPTables plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # ip6tables/ipt_bytes-XXX.rrd | ||
| 10 | # ip6tables/ipt_packets-XXX.rrd | ||
| 11 | |||
| 12 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 13 | |||
| 14 | $obj->data_sources = array('value'); | ||
| 15 | switch($_GET['t']) { | ||
| 16 | case 'ipt_bytes': | ||
| 17 | $obj->rrd_title = 'Bytes'; | ||
| 18 | break; | ||
| 19 | case 'ipt_packets': | ||
| 20 | $obj->rrd_title = 'Packets'; | ||
| 21 | break; | ||
| 22 | } | ||
| 23 | $obj->rrd_vertical = ''; | ||
| 24 | $obj->rrd_format = '%5.1lf%s'; | ||
| 25 | |||
| 26 | $obj->rrd_graph(); | ||
diff --git a/plugin/ipmi.json b/plugin/ipmi.json new file mode 100644 index 0000000..bd860dd --- /dev/null +++ b/plugin/ipmi.json | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | { | ||
| 2 | "fanspeed": { | ||
| 3 | "title": "Fanspeed ({{PI}})", | ||
| 4 | "vertical": "RPM", | ||
| 5 | "legend_format": "%5.1lf" | ||
| 6 | }, | ||
| 7 | "temerature": { | ||
| 8 | "title": "Temperature ({{PI}})", | ||
| 9 | "vertical": "Celsius", | ||
| 10 | "legend_format": "%5.1lf%s" | ||
| 11 | }, | ||
| 12 | "voltage": { | ||
| 13 | "title": "Voltage ({{PI}})", | ||
| 14 | "vertical": "Volt", | ||
| 15 | "legend_format": "%5.1lf" | ||
| 16 | } | ||
| 17 | } | ||
diff --git a/plugin/ipmi.php b/plugin/ipmi.php deleted file mode 100644 index 5593daf..0000000 --- a/plugin/ipmi.php +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Sensors plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT (similar to sensors plugin) | ||
| 9 | # | ||
| 10 | # collectd, by default, creates the ipmi RRDs in the following pattern: | ||
| 11 | # /(basedir)/(hostname)/ipmi/(type)-(instance).rrd | ||
| 12 | # | ||
| 13 | # Instances for IPMI usually have spaces in the filename, such as: | ||
| 14 | # | ||
| 15 | # temperature-System Temp system_board (7.1).rrd | ||
| 16 | # voltage-+1.1 V system_board (7.1).rrd | ||
| 17 | # voltage--12 V system_board (7.1).rrd | ||
| 18 | # voltage-+12 V system_board (7.1).rrd | ||
| 19 | # voltage-VBAT system_board (7.1).rrd | ||
| 20 | |||
| 21 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 22 | $obj->legend = array( | ||
| 23 | 'value' => 'Value', | ||
| 24 | ); | ||
| 25 | switch($obj->args['type']) { | ||
| 26 | case 'fanspeed': | ||
| 27 | $obj->rrd_title = sprintf('Fanspeed (%s)', $obj->args['pinstance']); | ||
| 28 | $obj->rrd_vertical = 'RPM'; | ||
| 29 | $obj->rrd_format = '%5.1lf'; | ||
| 30 | break; | ||
| 31 | case 'temperature': | ||
| 32 | $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); | ||
| 33 | $obj->rrd_vertical = 'Celsius'; | ||
| 34 | $obj->rrd_format = '%5.1lf%s'; | ||
| 35 | break; | ||
| 36 | case 'voltage': | ||
| 37 | $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']); | ||
| 38 | $obj->rrd_vertical = 'Volt'; | ||
| 39 | $obj->rrd_format = '%5.1lf'; | ||
| 40 | break; | ||
| 41 | } | ||
| 42 | |||
| 43 | $obj->rrd_graph(); | ||
diff --git a/plugin/iptables.json b/plugin/iptables.json new file mode 100644 index 0000000..ba2945f --- /dev/null +++ b/plugin/iptables.json | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | { | ||
| 2 | "ipt_bytes": { | ||
| 3 | "title": "IP-Tables Traffic", | ||
| 4 | "vertical": "{{ND}}", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend_format": "%5.1lf%s", | ||
| 7 | "datasize": true | ||
| 8 | }, | ||
| 9 | "ipt_packets": { | ||
| 10 | "title": "IP-Tables Packets", | ||
| 11 | "vertical": "Packets", | ||
| 12 | "type": "stacked", | ||
| 13 | "legend_format": "%5.1lf%s" | ||
| 14 | } | ||
| 15 | } | ||
diff --git a/plugin/iptables.php b/plugin/iptables.php deleted file mode 100644 index e60d2dc..0000000 --- a/plugin/iptables.php +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd IPTables plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # iptables/ipt_bytes-XXX.rrd | ||
| 10 | # iptables/ipt_packets-XXX.rrd | ||
| 11 | |||
| 12 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 13 | |||
| 14 | $obj->data_sources = array('value'); | ||
| 15 | switch($_GET['t']) { | ||
| 16 | case 'ipt_bytes': | ||
| 17 | $obj->rrd_title = 'Bytes'; | ||
| 18 | break; | ||
| 19 | case 'ipt_packets': | ||
| 20 | $obj->rrd_title = 'Packets'; | ||
| 21 | break; | ||
| 22 | } | ||
| 23 | $obj->rrd_vertical = ''; | ||
| 24 | $obj->rrd_format = '%5.1lf%s'; | ||
| 25 | |||
| 26 | $obj->rrd_graph(); | ||
diff --git a/plugin/irq.json b/plugin/irq.json new file mode 100644 index 0000000..b45c043 --- /dev/null +++ b/plugin/irq.json | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | { | ||
| 2 | "irq": { | ||
| 3 | "type": "stacked", | ||
| 4 | "title": "Interrupts", | ||
| 5 | "vertical": "IRQs/s", | ||
| 6 | "legend_format": "%6.1lf" | ||
| 7 | } | ||
| 8 | } | ||
diff --git a/plugin/irq.php b/plugin/irq.php deleted file mode 100644 index 6cd87f9..0000000 --- a/plugin/irq.php +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd IRQ plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # irq/ | ||
| 10 | # irq/irq-XX.rrd | ||
| 11 | |||
| 12 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 13 | |||
| 14 | $obj->rrd_title = 'Interrupts'; | ||
| 15 | $obj->rrd_vertical = 'IRQs/s'; | ||
| 16 | $obj->rrd_format = '%6.1lf'; | ||
| 17 | |||
| 18 | $obj->rrd_graph(); | ||
diff --git a/plugin/libvirt.json b/plugin/libvirt.json new file mode 100644 index 0000000..9329a8a --- /dev/null +++ b/plugin/libvirt.json | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | { | ||
| 2 | "disk_octets": { | ||
| 3 | "title": "Disk Traffic ({{TI}})", | ||
| 4 | "vertical": "Bytes per second", | ||
| 5 | "type": "io", | ||
| 6 | "legend": { | ||
| 7 | "read": { | ||
| 8 | "name": "Read", | ||
| 9 | "color": "0000ff" | ||
| 10 | }, | ||
| 11 | "write": { | ||
| 12 | "name": "Write", | ||
| 13 | "color": "00b000" | ||
| 14 | } | ||
| 15 | }, | ||
| 16 | "legend_format": "%5.1lf%s" | ||
| 17 | }, | ||
| 18 | "disk_ops": { | ||
| 19 | "title": "Disk Operations ({{TI}})", | ||
| 20 | "vertical": "Ops per second", | ||
| 21 | "type": "io", | ||
| 22 | "legend": { | ||
| 23 | "read": { | ||
| 24 | "name": "Read", | ||
| 25 | "color": "0000ff" | ||
| 26 | }, | ||
| 27 | "write": { | ||
| 28 | "name": "Write", | ||
| 29 | "color": "00b000" | ||
| 30 | } | ||
| 31 | }, | ||
| 32 | "legend_format": "%5.1lf%s" | ||
| 33 | }, | ||
| 34 | "if_dropped": { | ||
| 35 | "title": "Interface Packets Dropped ({{TI}})", | ||
| 36 | "vertical": "Packets/s", | ||
| 37 | "type": "io", | ||
| 38 | "legend": { | ||
| 39 | "rx": { | ||
| 40 | "name": "Receive", | ||
| 41 | "color": "0000ff" | ||
| 42 | }, | ||
| 43 | "tx": { | ||
| 44 | "name": "Transmit", | ||
| 45 | "color": "00b000" | ||
| 46 | } | ||
| 47 | }, | ||
| 48 | "legend_format": "%5.1lf%s" | ||
| 49 | }, | ||
| 50 | "if_errors": { | ||
| 51 | "title": "Interface Errors ({{TI}})", | ||
| 52 | "vertical": "Errors/s", | ||
| 53 | "type": "io", | ||
| 54 | "legend": { | ||
| 55 | "rx": { | ||
| 56 | "name": "Receive", | ||
| 57 | "color": "0000ff" | ||
| 58 | }, | ||
| 59 | "tx": { | ||
| 60 | "name": "Transmit", | ||
| 61 | "color": "00b000" | ||
| 62 | } | ||
| 63 | }, | ||
| 64 | "legend_format": "%5.1lf%s" | ||
| 65 | }, | ||
| 66 | "if_octets": { | ||
| 67 | "title": "Interface Traffic ({{TI}})", | ||
| 68 | "vertical": "{{ND}} per second", | ||
| 69 | "type": "io", | ||
| 70 | "legend": { | ||
| 71 | "rx": { | ||
| 72 | "name": "Receive", | ||
| 73 | "color": "0000ff" | ||
| 74 | }, | ||
| 75 | "tx": { | ||
| 76 | "name": "Transmit", | ||
| 77 | "color": "00b000" | ||
| 78 | } | ||
| 79 | }, | ||
| 80 | "legend_format": "%5.1lf%s", | ||
| 81 | "datasize": true | ||
| 82 | }, | ||
| 83 | "if_packets": { | ||
| 84 | "title": "Interface Packets ({{TI}})", | ||
| 85 | "vertical": "Packets per second", | ||
| 86 | "type": "io", | ||
| 87 | "legend": { | ||
| 88 | "rx": { | ||
| 89 | "name": "Receive", | ||
| 90 | "color": "0000ff" | ||
| 91 | }, | ||
| 92 | "tx": { | ||
| 93 | "name": "Transmit", | ||
| 94 | "color": "00b000" | ||
| 95 | } | ||
| 96 | }, | ||
| 97 | "legend_format": "%5.1lf%s" | ||
| 98 | }, | ||
| 99 | "virt_cpu_total": { | ||
| 100 | "title": "CPU usage", | ||
| 101 | "vertical": "CPU time", | ||
| 102 | "legend": { | ||
| 103 | "value": { | ||
| 104 | "name": "CPU time", | ||
| 105 | "color": "0000ff" | ||
| 106 | } | ||
| 107 | }, | ||
| 108 | "legend_format": "%5.1lf" | ||
| 109 | }, | ||
| 110 | "virt_vcpu": { | ||
| 111 | "title": "vCPU usage", | ||
| 112 | "vertical": "vCPU time", | ||
| 113 | "legend_format": "%5.1lf" | ||
| 114 | } | ||
| 115 | } | ||
diff --git a/plugin/libvirt.php b/plugin/libvirt.php deleted file mode 100644 index bcaeeb9..0000000 --- a/plugin/libvirt.php +++ /dev/null | |||
| @@ -1,144 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd libvirt plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | |||
| 7 | # LAYOUT | ||
| 8 | # libvirt/ | ||
| 9 | # libvirt/disk_octets-XXXX.rrd | ||
| 10 | # libvirt/disk_ops-XXXX.rrd | ||
| 11 | # libvirt/if_dropped-XXXX.rrd | ||
| 12 | # libvirt/if_errors-XXXX.rrd | ||
| 13 | # libvirt/if_octets-XXXX.rrd | ||
| 14 | # libvirt/if_packets-XXXX.rrd | ||
| 15 | # libvirt/virt_cpu_total.rrd | ||
| 16 | |||
| 17 | require_once 'type/GenericIO.class.php'; | ||
| 18 | $obj = new Type_GenericIO($CONFIG, $_GET); | ||
| 19 | |||
| 20 | switch($obj->args['type']) { | ||
| 21 | case 'disk_octets': | ||
| 22 | $obj->data_sources = array('read', 'write'); | ||
| 23 | $obj->legend = array( | ||
| 24 | 'read' => 'Read', | ||
| 25 | 'write' => 'Written', | ||
| 26 | ); | ||
| 27 | $obj->colors = array( | ||
| 28 | 'read' => '0000ff', | ||
| 29 | 'write' => '00b000', | ||
| 30 | ); | ||
| 31 | $obj->rrd_title = sprintf('Disk Traffic (%s)', $obj->args['tinstance']); | ||
| 32 | $obj->rrd_vertical = 'Bytes per second'; | ||
| 33 | $obj->rrd_format = '%5.1lf%s'; | ||
| 34 | break; | ||
| 35 | case 'disk_ops': | ||
| 36 | $obj->data_sources = array('read', 'write'); | ||
| 37 | $obj->legend = array( | ||
| 38 | 'read' => 'Read', | ||
| 39 | 'write' => 'Written', | ||
| 40 | ); | ||
| 41 | $obj->colors = array( | ||
| 42 | 'read' => '0000ff', | ||
| 43 | 'write' => '00b000', | ||
| 44 | ); | ||
| 45 | $obj->rrd_title = sprintf('Disk Operations (%s)', $obj->args['tinstance']); | ||
| 46 | $obj->rrd_vertical = 'Ops per second'; | ||
| 47 | $obj->rrd_format = '%5.1lf%s'; | ||
| 48 | break; | ||
| 49 | case 'if_dropped': | ||
| 50 | $obj->data_sources = array('rx', 'tx'); | ||
| 51 | $obj->legend = array( | ||
| 52 | 'rx' => 'Receive', | ||
| 53 | 'tx' => 'Transmit', | ||
| 54 | ); | ||
| 55 | $obj->colors = array( | ||
| 56 | 'rx' => '0000ff', | ||
| 57 | 'tx' => '00b000', | ||
| 58 | ); | ||
| 59 | $obj->rrd_title = sprintf('Interface Packets Dropped (%s)', $obj->args['tinstance']); | ||
| 60 | $obj->rrd_vertical = 'Packets dropped per second'; | ||
| 61 | break; | ||
| 62 | case 'if_errors': | ||
| 63 | $obj->data_sources = array('rx', 'tx'); | ||
| 64 | $obj->legend = array( | ||
| 65 | 'rx' => 'Receive', | ||
| 66 | 'tx' => 'Transmit', | ||
| 67 | ); | ||
| 68 | $obj->colors = array( | ||
| 69 | 'rx' => '0000ff', | ||
| 70 | 'tx' => '00b000', | ||
| 71 | ); | ||
| 72 | $obj->rrd_title = sprintf('Interface Errors (%s)', $obj->args['tinstance']); | ||
| 73 | $obj->rrd_vertical = 'Errors per second'; | ||
| 74 | break; | ||
| 75 | case 'if_octets': | ||
| 76 | $obj->data_sources = array('rx', 'tx'); | ||
| 77 | $obj->legend = array( | ||
| 78 | 'rx' => 'Receive', | ||
| 79 | 'tx' => 'Transmit', | ||
| 80 | ); | ||
| 81 | $obj->colors = array( | ||
| 82 | 'rx' => '0000ff', | ||
| 83 | 'tx' => '00b000', | ||
| 84 | ); | ||
| 85 | $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args['tinstance']); | ||
| 86 | $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize'])); | ||
| 87 | $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; | ||
| 88 | break; | ||
| 89 | case 'if_packets': | ||
| 90 | $obj->data_sources = array('rx', 'tx'); | ||
| 91 | $obj->legend = array( | ||
| 92 | 'rx' => 'Receive', | ||
| 93 | 'tx' => 'Transmit', | ||
| 94 | ); | ||
| 95 | $obj->colors = array( | ||
| 96 | 'rx' => '0000ff', | ||
| 97 | 'tx' => '00b000', | ||
| 98 | ); | ||
| 99 | $obj->rrd_title = sprintf('Interface Packets (%s)', $obj->args['tinstance']); | ||
| 100 | $obj->rrd_vertical = 'Packets per second'; | ||
| 101 | break; | ||
| 102 | case 'virt_cpu_total': | ||
| 103 | require_once 'type/Default.class.php'; | ||
| 104 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 105 | |||
| 106 | $obj->data_sources = array('value'); | ||
| 107 | $obj->legend = array( | ||
| 108 | 'value' => 'CPU time', | ||
| 109 | ); | ||
| 110 | $obj->colors = array( | ||
| 111 | 'value' => '0000ff', | ||
| 112 | ); | ||
| 113 | $obj->rrd_title = 'CPU usage'; | ||
| 114 | $obj->rrd_vertical = 'CPU time'; | ||
| 115 | break; | ||
| 116 | case 'virt_vcpu': | ||
| 117 | require_once 'type/Default.class.php'; | ||
| 118 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 119 | |||
| 120 | $obj->data_sources = array('value'); | ||
| 121 | $obj->legend = array( | ||
| 122 | 'value' => 'VCPU time', | ||
| 123 | ); | ||
| 124 | $obj->colors = array( | ||
| 125 | 'value' => '0000ff', | ||
| 126 | ); | ||
| 127 | $obj->rrd_title = 'VCPU usage'; | ||
| 128 | $obj->rrd_vertical = 'VCPU time'; | ||
| 129 | break; | ||
| 130 | } | ||
| 131 | |||
| 132 | $obj->rrd_format = '%5.1lf%s'; | ||
| 133 | |||
| 134 | if ($CONFIG['version'] < 5 && count($obj->data_sources) == 1) { | ||
| 135 | $obj->data_sources = array('ns'); | ||
| 136 | |||
| 137 | $obj->legend['ns'] = $obj->legend['value']; | ||
| 138 | unset($obj->legend['value']); | ||
| 139 | |||
| 140 | $obj->colors['ns'] = $obj->colors['value']; | ||
| 141 | unset($obj->colors['value']); | ||
| 142 | } | ||
| 143 | |||
| 144 | $obj->rrd_graph(); | ||
diff --git a/plugin/load.json b/plugin/load.json new file mode 100644 index 0000000..4166087 --- /dev/null +++ b/plugin/load.json | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | { | ||
| 2 | "load": { | ||
| 3 | "title": "System load", | ||
| 4 | "vertical": "System load", | ||
| 5 | "type": "default", | ||
| 6 | "legend": { | ||
| 7 | "shortterm": { | ||
| 8 | "name": " 1 min", | ||
| 9 | "color": "00ff00" | ||
| 10 | }, | ||
| 11 | "midterm": { | ||
| 12 | "name": " 5 min", | ||
| 13 | "color": "0000ff" | ||
| 14 | }, | ||
| 15 | "longterm": { | ||
| 16 | "name": "15 min", | ||
| 17 | "color": "ff0000" | ||
| 18 | } | ||
| 19 | }, | ||
| 20 | "legend_format": "%.2lf" | ||
| 21 | } | ||
| 22 | } | ||
diff --git a/plugin/load.php b/plugin/load.php deleted file mode 100644 index 78520c5..0000000 --- a/plugin/load.php +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Load plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # load/load.rrd | ||
| 10 | |||
| 11 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 12 | $obj->data_sources = array('shortterm', 'midterm', 'longterm'); | ||
| 13 | $obj->legend = array( | ||
| 14 | 'shortterm' => ' 1 min', | ||
| 15 | 'midterm' => ' 5 min', | ||
| 16 | 'longterm' => '15 min', | ||
| 17 | ); | ||
| 18 | $obj->colors = array( | ||
| 19 | 'shortterm' => '00ff00', | ||
| 20 | 'midterm' => '0000ff', | ||
| 21 | 'longterm' => 'ff0000', | ||
| 22 | ); | ||
| 23 | $obj->rrd_title = 'System load'; | ||
| 24 | $obj->rrd_vertical = 'System load'; | ||
| 25 | $obj->rrd_format = '%.2lf'; | ||
| 26 | |||
| 27 | $obj->rrd_graph(); | ||
diff --git a/plugin/md.json b/plugin/md.json new file mode 100644 index 0000000..6e0812c --- /dev/null +++ b/plugin/md.json | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | { | ||
| 2 | "md_disks": { | ||
| 3 | "title": "MD (md-{{PI}})", | ||
| 4 | "vertical": "Disks", | ||
| 5 | "legend_format": "%2.0lf" | ||
| 6 | } | ||
| 7 | } | ||
diff --git a/plugin/md.php b/plugin/md.php deleted file mode 100644 index 9d09efe..0000000 --- a/plugin/md.php +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd MD plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # md-XXXX/ | ||
| 10 | # md-XXXX/md_disks-XXXX.rrd | ||
| 11 | |||
| 12 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 13 | $obj->legend = array( | ||
| 14 | 'value' => 'Value', | ||
| 15 | ); | ||
| 16 | $obj->rrd_title = sprintf('Disks (md-%s)', $obj->args['pinstance']); | ||
| 17 | $obj->rrd_vertical = '#'; | ||
| 18 | $obj->rrd_format = '%2.0lf'; | ||
| 19 | |||
| 20 | $obj->rrd_graph(); | ||
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 @@ | |||
| 1 | { | ||
| 2 | "df": { | ||
| 3 | "title": "Memcached Memory Usage", | ||
| 4 | "vertical": "Bytes", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend": { | ||
| 7 | "free": { | ||
| 8 | "name": "Free", | ||
| 9 | "color": "00ff00" | ||
| 10 | }, | ||
| 11 | "used": { | ||
| 12 | "name": "Used", | ||
| 13 | "color": "ff0000" | ||
| 14 | } | ||
| 15 | }, | ||
| 16 | "legend_format": "%5.1lf%s" | ||
| 17 | }, | ||
| 18 | "memcached_command": { | ||
| 19 | "title": "Memcached Commands", | ||
| 20 | "vertical": "Commands", | ||
| 21 | "type": "stacked", | ||
| 22 | "legend": { | ||
| 23 | "flush": { | ||
| 24 | "name": "Flush", | ||
| 25 | "color": "00e000" | ||
| 26 | }, | ||
| 27 | "get": { | ||
| 28 | "name": "Get", | ||
| 29 | "color": "0000ff" | ||
| 30 | }, | ||
| 31 | "set": { | ||
| 32 | "name": "Set", | ||
| 33 | "color": "ffb000" | ||
| 34 | } | ||
| 35 | }, | ||
| 36 | "legend_format": "%5.1lf%s" | ||
| 37 | }, | ||
| 38 | "memcached_connections": { | ||
| 39 | "title": "Memcached Number of Connections", | ||
| 40 | "vertical": "Connections", | ||
| 41 | "legend": { | ||
| 42 | "value": { | ||
| 43 | "name": "Connections", | ||
| 44 | "color": "00b000" | ||
| 45 | } | ||
| 46 | }, | ||
| 47 | "legend_format": "%5.1lf%s" | ||
| 48 | }, | ||
| 49 | "memcached_items": { | ||
| 50 | "title": "Number of Items in Memcached", | ||
| 51 | "vertical": "Items", | ||
| 52 | "legend": { | ||
| 53 | "value": { | ||
| 54 | "name": "Items", | ||
| 55 | "color": "00b000" | ||
| 56 | } | ||
| 57 | }, | ||
| 58 | "legend_format": "%5.1lf%s" | ||
| 59 | }, | ||
| 60 | "memcached_octets": { | ||
| 61 | "title": "Memcached Network Traffic", | ||
| 62 | "vertical": "{{ND}}", | ||
| 63 | "type": "io", | ||
| 64 | "legend": { | ||
| 65 | "rx": { | ||
| 66 | "name": "Receive", | ||
| 67 | "color": "0000ff" | ||
| 68 | }, | ||
| 69 | "tx": { | ||
| 70 | "name": "Transmit", | ||
| 71 | "color": "00b000" | ||
| 72 | } | ||
| 73 | }, | ||
| 74 | "legend_format": "%5.1lf%s", | ||
| 75 | "datasize": true | ||
| 76 | }, | ||
| 77 | "memcached_ops": { | ||
| 78 | "title": "Memcached Operations", | ||
| 79 | "vertical": "Commands", | ||
| 80 | "type": "stacked", | ||
| 81 | "legend": { | ||
| 82 | "evictions": { | ||
| 83 | "name": "Evictions", | ||
| 84 | "color": "00e000" | ||
| 85 | }, | ||
| 86 | "hits": { | ||
| 87 | "name": "Hits", | ||
| 88 | "color": "0000ff" | ||
| 89 | }, | ||
| 90 | "misses": { | ||
| 91 | "name": "Misses", | ||
| 92 | "color": "ffb000" | ||
| 93 | } | ||
| 94 | }, | ||
| 95 | "legend_format": "%5.1lf%s" | ||
| 96 | }, | ||
| 97 | "percent": { | ||
| 98 | "title": "Memcached Hit Ratio", | ||
| 99 | "vertical": "Percent", | ||
| 100 | "legend": { | ||
| 101 | "value": { | ||
| 102 | "name": "Percent", | ||
| 103 | "color": "00e000" | ||
| 104 | } | ||
| 105 | }, | ||
| 106 | "legend_format": "%5.1lf%s" | ||
| 107 | }, | ||
| 108 | "ps_count": { | ||
| 109 | "title": "Memcached number of Threads", | ||
| 110 | "vertical": "Threads", | ||
| 111 | "legend": { | ||
| 112 | "value": { | ||
| 113 | "name": "Threads", | ||
| 114 | "color": "00b000" | ||
| 115 | } | ||
| 116 | }, | ||
| 117 | "legend_format": "%5.1lf%s" | ||
| 118 | }, | ||
| 119 | "ps_cputime": { | ||
| 120 | "title": "CPU Time consumed by Memcached", | ||
| 121 | "vertical": "CPU Time", | ||
| 122 | "legend": { | ||
| 123 | "user": { | ||
| 124 | "name": "User", | ||
| 125 | "color": "00e000" | ||
| 126 | }, | ||
| 127 | "syst": { | ||
| 128 | "name": "System", | ||
| 129 | "color": "0000ff" | ||
| 130 | } | ||
| 131 | }, | ||
| 132 | "legend_format": "%5.1lf%s" | ||
| 133 | } | ||
| 134 | } | ||
diff --git a/plugin/memcached.php b/plugin/memcached.php deleted file mode 100644 index 62eebfd..0000000 --- a/plugin/memcached.php +++ /dev/null | |||
| @@ -1,179 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Memcached plugin | ||
| 4 | |||
| 5 | # Details on http://github.com/octo/collectd/blob/master/src/memcached.c | ||
| 6 | |||
| 7 | |||
| 8 | |||
| 9 | require_once 'conf/common.inc.php'; | ||
| 10 | |||
| 11 | ## LAYOUT | ||
| 12 | # df-cache.rrd | ||
| 13 | # memcached_command-(flush|get|set).rrd | ||
| 14 | # memcached_connections-current.rrd | ||
| 15 | # memcached_items-current.rrd | ||
| 16 | # memcached_octets.rrd | ||
| 17 | # memcached_ops-(evictions|hits|misses).rrd | ||
| 18 | # percent-hitratio.rrd | ||
| 19 | # ps_count.rrd | ||
| 20 | # ps_cputime.rrd | ||
| 21 | |||
| 22 | |||
| 23 | switch(GET('t')) { | ||
| 24 | # df-cache.rrd | ||
| 25 | case 'df': | ||
| 26 | require_once 'type/Default.class.php'; | ||
| 27 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 28 | $obj->data_sources = array('used', 'free'); | ||
| 29 | $obj->order = array('used', 'free'); | ||
| 30 | $obj->legend = array( | ||
| 31 | 'used' => 'Used', | ||
| 32 | 'free' => 'Free', | ||
| 33 | ); | ||
| 34 | $obj->colors = array( | ||
| 35 | 'used' => '00e000', | ||
| 36 | 'free' => '0000ff', | ||
| 37 | ); | ||
| 38 | $obj->rrd_title = 'Memcached Memory Usage'; | ||
| 39 | $obj->rrd_vertical = 'bytes'; | ||
| 40 | break; | ||
| 41 | |||
| 42 | # memcached_command-(flush|get|set).rrd | ||
| 43 | case 'memcached_command': | ||
| 44 | require_once 'type/GenericStacked.class.php'; | ||
| 45 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 46 | $obj->order = array('flush', 'get', 'set'); | ||
| 47 | $obj->legend = array( | ||
| 48 | 'flush' => 'Flush', | ||
| 49 | 'get' => 'Get', | ||
| 50 | 'set' => 'Set', | ||
| 51 | ); | ||
| 52 | $obj->colors = array( | ||
| 53 | 'flush' => '00e000', | ||
| 54 | 'get' => '0000ff', | ||
| 55 | 'set' => 'ffb000', | ||
| 56 | ); | ||
| 57 | $obj->rrd_title = 'Memcached Commands'; | ||
| 58 | $obj->rrd_vertical = 'Commands'; | ||
| 59 | break; | ||
| 60 | |||
| 61 | # memcached_connections-current.rrd | ||
| 62 | case 'memcached_connections': | ||
| 63 | require_once 'type/Default.class.php'; | ||
| 64 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 65 | $obj->data_sources = array('value'); | ||
| 66 | $obj->legend = array( | ||
| 67 | 'value' => 'Connections', | ||
| 68 | ); | ||
| 69 | $obj->colors = array( | ||
| 70 | 'percent' => '00b000', | ||
| 71 | ); | ||
| 72 | $obj->rrd_title = 'Memcached Number of Connections'; | ||
| 73 | $obj->rrd_vertical = 'Connections'; | ||
| 74 | break; | ||
| 75 | |||
| 76 | # memcached_items-current.rrd | ||
| 77 | case 'memcached_items': | ||
| 78 | require_once 'type/Default.class.php'; | ||
| 79 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 80 | $obj->data_sources = array('value'); | ||
| 81 | $obj->legend = array( | ||
| 82 | 'value ' => 'Items', | ||
| 83 | ); | ||
| 84 | $obj->colors = array( | ||
| 85 | 'value' => '00b000', | ||
| 86 | ); | ||
| 87 | $obj->rrd_title = 'Number of Items in Memcached'; | ||
| 88 | $obj->rrd_vertical = 'Items'; | ||
| 89 | break; | ||
| 90 | |||
| 91 | # memcached_octets.rrd | ||
| 92 | case 'memcached_octets': | ||
| 93 | require_once 'type/Default.class.php'; | ||
| 94 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 95 | $obj->data_sources = array('rx', 'tx'); | ||
| 96 | $obj->order = array('rx', 'tx'); | ||
| 97 | $obj->legend = array( | ||
| 98 | 'rx' => 'Receive', | ||
| 99 | 'tx' => 'Transmit', | ||
| 100 | ); | ||
| 101 | $obj->colors = array( | ||
| 102 | 'rx' => '0000ff', | ||
| 103 | 'tx' => '00b000', | ||
| 104 | ); | ||
| 105 | $obj->rrd_title = 'Memcached Network Traffic'; | ||
| 106 | $obj->rrd_vertical = ucfirst($CONFIG['network_datasize']); | ||
| 107 | $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; | ||
| 108 | break; | ||
| 109 | # memcached_ops-(evictions|hits|misses).rrd | ||
| 110 | case 'memcached_ops': | ||
| 111 | require_once 'type/GenericStacked.class.php'; | ||
| 112 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 113 | $obj->order = array('evictions', 'hits', 'misses'); | ||
| 114 | $obj->legend = array( | ||
| 115 | 'evictions' => 'Evictions', | ||
| 116 | 'hits' => 'Hits', | ||
| 117 | 'misses' => 'Misses', | ||
| 118 | ); | ||
| 119 | $obj->colors = array( | ||
| 120 | 'evictions' => '00e000', | ||
| 121 | 'hits' => '0000ff', | ||
| 122 | 'misses' => 'ffb000', | ||
| 123 | ); | ||
| 124 | $obj->rrd_title = 'Memcached Operations'; | ||
| 125 | $obj->rrd_vertical = 'Commands'; | ||
| 126 | break; | ||
| 127 | |||
| 128 | # percent-hitratio.rrd | ||
| 129 | case 'percent': | ||
| 130 | require_once 'type/Default.class.php'; | ||
| 131 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 132 | $obj->data_sources = array('percent'); | ||
| 133 | $obj->legend = array( | ||
| 134 | 'percent ' => 'Percentage', | ||
| 135 | ); | ||
| 136 | $obj->colors = array( | ||
| 137 | 'percent' => '00e000', | ||
| 138 | ); | ||
| 139 | $obj->rrd_title = 'Memcached Hits/Gets Ratio'; | ||
| 140 | $obj->rrd_vertical = 'Percent'; | ||
| 141 | break; | ||
| 142 | # ps_count.rrd | ||
| 143 | case 'ps_count': | ||
| 144 | require_once 'type/Default.class.php'; | ||
| 145 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 146 | $obj->data_sources = array('threads'); | ||
| 147 | $obj->order = array('threads'); | ||
| 148 | $obj->legend = array( | ||
| 149 | 'threads' => 'Threads', | ||
| 150 | ); | ||
| 151 | $obj->colors = array( | ||
| 152 | 'threads' => '00b000', | ||
| 153 | ); | ||
| 154 | $obj->rrd_title = 'Memcached number of Threads'; | ||
| 155 | $obj->rrd_vertical = 'Threads'; | ||
| 156 | break; | ||
| 157 | |||
| 158 | # ps_cputime.rrd | ||
| 159 | case 'ps_cputime': | ||
| 160 | require_once 'type/Default.class.php'; | ||
| 161 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 162 | $obj->data_sources = array('user', 'syst'); | ||
| 163 | $obj->order = array('user', 'syst'); | ||
| 164 | $obj->legend = array( | ||
| 165 | 'user' => 'User', | ||
| 166 | 'syst' => 'System', | ||
| 167 | ); | ||
| 168 | $obj->colors = array( | ||
| 169 | 'user' => '00e000', | ||
| 170 | 'syst' => '0000ff', | ||
| 171 | ); | ||
| 172 | $obj->rrd_title = 'CPU Time consumed by the memcached process'; | ||
| 173 | $obj->rrd_vertical = 'Time'; | ||
| 174 | break; | ||
| 175 | } | ||
| 176 | |||
| 177 | $obj->rrd_format = '%5.1lf%s'; | ||
| 178 | |||
| 179 | $obj->rrd_graph(); | ||
diff --git a/plugin/memory.json b/plugin/memory.json new file mode 100644 index 0000000..5921c3b --- /dev/null +++ b/plugin/memory.json | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | { | ||
| 2 | "memory": { | ||
| 3 | "title": "Physical memory utilization", | ||
| 4 | "vertical": "Bytes", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend": { | ||
| 7 | "free": { | ||
| 8 | "name": "Free", | ||
| 9 | "color": "00e000" | ||
| 10 | }, | ||
| 11 | "inactive": { | ||
| 12 | "name": "Inactive", | ||
| 13 | "color": "00b000" | ||
| 14 | }, | ||
| 15 | "cached": { | ||
| 16 | "name": "Cached", | ||
| 17 | "color": "0000ff" | ||
| 18 | }, | ||
| 19 | "buffered": { | ||
| 20 | "name": "Buffered", | ||
| 21 | "color": "ffb000" | ||
| 22 | }, | ||
| 23 | "locked": { | ||
| 24 | "name": "Locked", | ||
| 25 | "color": "ff00ff" | ||
| 26 | }, | ||
| 27 | "used": { | ||
| 28 | "name": "Used", | ||
| 29 | "color": "ff0000" | ||
| 30 | }, | ||
| 31 | "active": { | ||
| 32 | "name": "Active", | ||
| 33 | "color": "ff00ff" | ||
| 34 | }, | ||
| 35 | "wired": { | ||
| 36 | "name": "Wired", | ||
| 37 | "color": "ff0000" | ||
| 38 | } | ||
| 39 | } | ||
| 40 | } | ||
| 41 | } | ||
diff --git a/plugin/memory.php b/plugin/memory.php deleted file mode 100644 index 0a1fe68..0000000 --- a/plugin/memory.php +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Memory plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # memory/ | ||
| 10 | # memory/memory-buffered.rrd | ||
| 11 | # memory/memory-cached.rrd | ||
| 12 | # memory/memory-free.rrd | ||
| 13 | # memory/memory-used.rrd | ||
| 14 | |||
| 15 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 16 | $obj->order = array('free', 'inactive', 'buffered', 'cached', 'cache', 'locked', 'used', 'active', 'wired'); | ||
| 17 | $obj->legend = array( | ||
| 18 | 'free' => 'Free', | ||
| 19 | 'inactive' => 'Inactive', | ||
| 20 | 'cached' => 'Cached', | ||
| 21 | 'cache' => 'Cache', | ||
| 22 | 'buffered' => 'Buffered', | ||
| 23 | 'locked' => 'Locked', | ||
| 24 | 'used' => 'Used', | ||
| 25 | 'active' => 'Active', | ||
| 26 | 'wired' => 'Wired', | ||
| 27 | ); | ||
| 28 | $obj->colors = array( | ||
| 29 | 'free' => '00e000', | ||
| 30 | 'inactive' => '00b000', | ||
| 31 | 'cached' => '0000ff', | ||
| 32 | 'cache' => '0000ff', | ||
| 33 | 'buffered' => 'ffb000', | ||
| 34 | 'locked' => 'ff00ff', | ||
| 35 | 'used' => 'ff0000', | ||
| 36 | 'active' => 'ff00ff', | ||
| 37 | 'wired' => 'ff0000', | ||
| 38 | ); | ||
| 39 | |||
| 40 | $obj->rrd_title = 'Physical memory utilization'; | ||
| 41 | $obj->rrd_vertical = 'Bytes'; | ||
| 42 | $obj->rrd_format = '%5.1lf%s'; | ||
| 43 | |||
| 44 | $obj->rrd_graph(); | ||
diff --git a/plugin/mysql.json b/plugin/mysql.json new file mode 100644 index 0000000..e4dd6fc --- /dev/null +++ b/plugin/mysql.json | |||
| @@ -0,0 +1,143 @@ | |||
| 1 | { | ||
| 2 | "cache_result": { | ||
| 3 | "title": "MySQL query cache ({{PI}})", | ||
| 4 | "vertical": "Queries/s", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend": { | ||
| 7 | "qcache-not_cached": { | ||
| 8 | "name": "Not Cached", | ||
| 9 | "color": "f0a000" | ||
| 10 | }, | ||
| 11 | "qcache-inserts": { | ||
| 12 | "name": "Inserts", | ||
| 13 | "color": "0000ff" | ||
| 14 | }, | ||
| 15 | "qcache-hits": { | ||
| 16 | "name": "Hits", | ||
| 17 | "color": "00e000" | ||
| 18 | }, | ||
| 19 | "qcache-prunes": { | ||
| 20 | "name": "Lowmem Prunes", | ||
| 21 | "color": "ff0000" | ||
| 22 | } | ||
| 23 | }, | ||
| 24 | "legend_format": "%5.1lf%s" | ||
| 25 | }, | ||
| 26 | "cache_size": { | ||
| 27 | "title": "MySQL query cache size ({{PI}})", | ||
| 28 | "vertical": "Queries in cache", | ||
| 29 | "type": "stacked", | ||
| 30 | "legend": { | ||
| 31 | "value": { | ||
| 32 | "name": "Queries" | ||
| 33 | } | ||
| 34 | }, | ||
| 35 | "legend_format": "%5.1lf%s" | ||
| 36 | }, | ||
| 37 | "mysql_commands": { | ||
| 38 | "title": "MySQL commands ({{PI}})", | ||
| 39 | "vertical": "Issues/s", | ||
| 40 | "type": "stacked", | ||
| 41 | "legend_format": "%5.1lf%s" | ||
| 42 | }, | ||
| 43 | "mysql_handler": { | ||
| 44 | "title": "MySQL handler ({{PI}})", | ||
| 45 | "vertical": "Invocations", | ||
| 46 | "type": "stacked", | ||
| 47 | "legend": { | ||
| 48 | "commit": { | ||
| 49 | "color": "ff0000" | ||
| 50 | }, | ||
| 51 | "delete": { | ||
| 52 | "color": "ff00e7" | ||
| 53 | }, | ||
| 54 | "read_first": { | ||
| 55 | "color": "cc00ff" | ||
| 56 | }, | ||
| 57 | "read_key": { | ||
| 58 | "color": "3200ff" | ||
| 59 | }, | ||
| 60 | "read_next": { | ||
| 61 | "color": "0065ff" | ||
| 62 | }, | ||
| 63 | "read_prev": { | ||
| 64 | "color": "00fff3" | ||
| 65 | }, | ||
| 66 | "read_rnd": { | ||
| 67 | "color": "00ff65" | ||
| 68 | }, | ||
| 69 | "read_rnd_next": { | ||
| 70 | "color": "33ff00" | ||
| 71 | }, | ||
| 72 | "update": { | ||
| 73 | "color": "cbff00" | ||
| 74 | }, | ||
| 75 | "write": { | ||
| 76 | "color": "ff9800" | ||
| 77 | }, | ||
| 78 | "rollback": { | ||
| 79 | "color": "000000" | ||
| 80 | } | ||
| 81 | }, | ||
| 82 | "legend_format": "%5.1lf%s" | ||
| 83 | }, | ||
| 84 | "mysql_locks": { | ||
| 85 | "title": "MySQL locks ({{PI}})", | ||
| 86 | "vertical": "locks", | ||
| 87 | "legend": { | ||
| 88 | "immediate": { | ||
| 89 | "color": "ff0000" | ||
| 90 | }, | ||
| 91 | "waited": { | ||
| 92 | "color": "00ff00" | ||
| 93 | } | ||
| 94 | }, | ||
| 95 | "legend_format": "%5.1lf%s" | ||
| 96 | }, | ||
| 97 | "mysql_octets": { | ||
| 98 | "title": "MySQL Traffic ({{TI}})", | ||
| 99 | "vertical": "Bits per second", | ||
| 100 | "type": "io", | ||
| 101 | "legend": { | ||
| 102 | "rx": { | ||
| 103 | "name": "Receive", | ||
| 104 | "color": "0000ff" | ||
| 105 | }, | ||
| 106 | "tx": { | ||
| 107 | "name": "Transmit", | ||
| 108 | "color": "00b000" | ||
| 109 | } | ||
| 110 | }, | ||
| 111 | "legend_format": "%5.1lf%s" | ||
| 112 | }, | ||
| 113 | "threads": { | ||
| 114 | "title": "MySQL threads ({{PI}})", | ||
| 115 | "vertical": "Threads", | ||
| 116 | "type": "stacked", | ||
| 117 | "legend": { | ||
| 118 | "cached": { | ||
| 119 | "name": "Cached", | ||
| 120 | "color": "00e000" | ||
| 121 | }, | ||
| 122 | "connected": { | ||
| 123 | "name": "Connected", | ||
| 124 | "color": "0000ff" | ||
| 125 | }, | ||
| 126 | "running": { | ||
| 127 | "name": "Running", | ||
| 128 | "color": "ff0000" | ||
| 129 | } | ||
| 130 | }, | ||
| 131 | "legend_format": "%5.1lf%s" | ||
| 132 | }, | ||
| 133 | "total_threads": { | ||
| 134 | "title": "MySQL created threads ({{PI}})", | ||
| 135 | "vertical": "Created Threads", | ||
| 136 | "legend": { | ||
| 137 | "value": { | ||
| 138 | "name": "Created" | ||
| 139 | } | ||
| 140 | }, | ||
| 141 | "legend_format": "%5.1lf%s" | ||
| 142 | } | ||
| 143 | } | ||
diff --git a/plugin/mysql.php b/plugin/mysql.php deleted file mode 100644 index 880b8c0..0000000 --- a/plugin/mysql.php +++ /dev/null | |||
| @@ -1,140 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd MySQL plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 9 | $obj->rrd_format = '%5.1lf%s'; | ||
| 10 | |||
| 11 | switch($obj->args['type']) | ||
| 12 | { | ||
| 13 | case 'cache_result': | ||
| 14 | $obj->legend = array( | ||
| 15 | 'qcache-not_cached' => 'Not Cached', | ||
| 16 | 'qcache-inserts' => 'Inserts', | ||
| 17 | 'qcache-hits' => 'Hits', | ||
| 18 | 'qcache-prunes' => 'Lowmem Prunes', | ||
| 19 | ); | ||
| 20 | $obj->colors = array( | ||
| 21 | 'qcache-not_cached' => 'f0a000', | ||
| 22 | 'qcache-inserts' => '0000ff', | ||
| 23 | 'qcache-hits' => '00e000', | ||
| 24 | 'qcache-prunes' => 'ff0000', | ||
| 25 | ); | ||
| 26 | $obj->rrd_title = sprintf('MySQL query cache (%s)', $obj->args['pinstance']); | ||
| 27 | $obj->rrd_vertical = 'Queries/s'; | ||
| 28 | break; | ||
| 29 | case 'cache_size': | ||
| 30 | $obj->legend = array( | ||
| 31 | 'qcache' => 'Queries', | ||
| 32 | ); | ||
| 33 | $obj->rrd_title = sprintf('MySQL query cache size (%s)', $obj->args['pinstance']); | ||
| 34 | $obj->rrd_vertical = 'Queries in cache'; | ||
| 35 | break; | ||
| 36 | case 'mysql_commands': | ||
| 37 | $obj->rrd_title = sprintf('MySQL commands (%s)', $obj->args['pinstance']); | ||
| 38 | $obj->rrd_vertical = 'Issues/s'; | ||
| 39 | break; | ||
| 40 | case 'mysql_handler': | ||
| 41 | $obj->order = array('commit', 'delete', 'read_first', 'read_key', 'read_next', 'read_prev', 'read_rnd', 'read_rnd_next', 'update', 'write', 'rollback'); | ||
| 42 | $obj->colors = array( | ||
| 43 | 'commit' => 'ff0000', | ||
| 44 | 'delete' => 'ff00e7', | ||
| 45 | 'read_first' => 'cc00ff', | ||
| 46 | 'read_key' => '3200ff', | ||
| 47 | 'read_next' => '0065ff', | ||
| 48 | 'read_prev' => '00fff3', | ||
| 49 | 'read_rnd' => '00ff65', | ||
| 50 | 'read_rnd_next' => '33ff00', | ||
| 51 | 'update' => 'cbff00', | ||
| 52 | 'write' => 'ff9800', | ||
| 53 | 'rollback' => '000000', | ||
| 54 | ); | ||
| 55 | $obj->rrd_title = sprintf('MySQL handler (%s)', $obj->args['pinstance']); | ||
| 56 | $obj->rrd_vertical = 'Invocations'; | ||
| 57 | break; | ||
| 58 | case 'mysql_locks': | ||
| 59 | $obj->colors = array( | ||
| 60 | 'immediate' => 'ff0000', | ||
| 61 | 'waited' => '00ff00', | ||
| 62 | ); | ||
| 63 | $obj->rrd_title = sprintf('MySQL locks (%s)', $obj->args['pinstance']); | ||
| 64 | $obj->rrd_vertical = 'locks'; | ||
| 65 | break; | ||
| 66 | case 'mysql_octets': | ||
| 67 | $obj->data_sources = array('rx', 'tx'); | ||
| 68 | $obj->legend = array( | ||
| 69 | 'rx' => 'Receive', | ||
| 70 | 'tx' => 'Transmit', | ||
| 71 | ); | ||
| 72 | $obj->colors = array( | ||
| 73 | 'rx' => '0000ff', | ||
| 74 | 'tx' => '00b000', | ||
| 75 | ); | ||
| 76 | $obj->rrd_title = sprintf('MySQL traffic (%s)', $obj->args['pinstance']); | ||
| 77 | $obj->rrd_vertical = 'Bits per second'; | ||
| 78 | break; | ||
| 79 | case 'threads': | ||
| 80 | $obj->legend = array( | ||
| 81 | 'cached' => 'Cached', | ||
| 82 | 'connected' => 'Connected', | ||
| 83 | 'running' => 'Running', | ||
| 84 | ); | ||
| 85 | $obj->colors = array( | ||
| 86 | 'cached' => '00e000', | ||
| 87 | 'connected' => '0000ff', | ||
| 88 | 'running' => 'ff0000', | ||
| 89 | ); | ||
| 90 | $obj->rrd_title = sprintf('MySQL threads (%s)', $obj->args['pinstance']); | ||
| 91 | $obj->rrd_vertical = 'Threads'; | ||
| 92 | break; | ||
| 93 | case 'total_threads': | ||
| 94 | $obj->legend = array( | ||
| 95 | 'created' => 'Created', | ||
| 96 | ); | ||
| 97 | $obj->rrd_title = sprintf('MySQL created threads (%s)', $obj->args['pinstance']); | ||
| 98 | $obj->rrd_vertical = 'Created Threads'; | ||
| 99 | break; | ||
| 100 | # mysql_qcache is removed since commit collectd-4.10.0-104-g9ae3541 | ||
| 101 | case 'mysql_qcache': | ||
| 102 | $obj->data_sources = array('not_cached', 'inserts', 'hits', 'lowmem_prunes', 'queries_in_cache'); | ||
| 103 | $obj->legend = array( | ||
| 104 | 'not_cached' => 'Not Cached', | ||
| 105 | 'inserts' => 'Inserts', | ||
| 106 | 'hits' => 'Hits', | ||
| 107 | 'lowmem_prunes' => 'Lowmem Prunes', | ||
| 108 | 'queries_in_cache' => 'Queries in Cache', | ||
| 109 | ); | ||
| 110 | $obj->colors = array( | ||
| 111 | 'not_cached' => 'f0a000', | ||
| 112 | 'inserts' => '0000ff', | ||
| 113 | 'hits' => '00e000', | ||
| 114 | 'lowmem_prunes' => 'ff0000', | ||
| 115 | 'queries_in_cache' => 'cccccc', | ||
| 116 | ); | ||
| 117 | $obj->rrd_title = sprintf('MySQL query cache (%s)', $obj->args['pinstance']); | ||
| 118 | $obj->rrd_vertical = 'Queries/s'; | ||
| 119 | break; | ||
| 120 | # mysql_threads is removed since commit collectd-4.10.0-105-g6c48fca | ||
| 121 | case 'mysql_threads': | ||
| 122 | $obj->data_sources = array('cached', 'connected', 'running', 'created'); | ||
| 123 | $obj->legend = array( | ||
| 124 | 'cached' => 'Cached', | ||
| 125 | 'connected' => 'Connected', | ||
| 126 | 'running' => 'Running', | ||
| 127 | 'created' => 'Created', | ||
| 128 | ); | ||
| 129 | $obj->colors = array( | ||
| 130 | 'cached' => '00e000', | ||
| 131 | 'connected' => '0000ff', | ||
| 132 | 'running' => 'ff0000', | ||
| 133 | 'created' => 'cccccc', | ||
| 134 | ); | ||
| 135 | $obj->rrd_title = sprintf('MySQL threads (%s)', $obj->args['pinstance']); | ||
| 136 | $obj->rrd_vertical = 'Threads'; | ||
| 137 | break; | ||
| 138 | } | ||
| 139 | |||
| 140 | $obj->rrd_graph(); | ||
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 @@ | |||
| 1 | { | ||
| 2 | "if_collisions": { | ||
| 3 | "title": "Collisions ({{PI}})", | ||
| 4 | "vertical": "Collisions/s", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend": { | ||
| 7 | "value": { | ||
| 8 | "name": "Collisions" | ||
| 9 | } | ||
| 10 | }, | ||
| 11 | "legend_format": "%5.1lf%s" | ||
| 12 | }, | ||
| 13 | "if_dropped": { | ||
| 14 | "title": "Dropped Packets ({{PI}})", | ||
| 15 | "vertical": "Packets/s", | ||
| 16 | "type": "io", | ||
| 17 | "legend": { | ||
| 18 | "rx": { | ||
| 19 | "name": "Receive", | ||
| 20 | "color": "0000ff" | ||
| 21 | }, | ||
| 22 | "tx": { | ||
| 23 | "name": "Transmit", | ||
| 24 | "color": "00b000" | ||
| 25 | } | ||
| 26 | }, | ||
| 27 | "legend_format": "%5.1lf%s" | ||
| 28 | }, | ||
| 29 | "if_errors": { | ||
| 30 | "title": "Interface Errors ({{PI}})", | ||
| 31 | "vertical": "Errors/s", | ||
| 32 | "type": "io", | ||
| 33 | "legend": { | ||
| 34 | "rx": { | ||
| 35 | "name": "Receive", | ||
| 36 | "color": "0000ff" | ||
| 37 | }, | ||
| 38 | "tx": { | ||
| 39 | "name": "Transmit", | ||
| 40 | "color": "00b000" | ||
| 41 | } | ||
| 42 | }, | ||
| 43 | "legend_format": "%5.1lf%s" | ||
| 44 | }, | ||
| 45 | "if_multicast": { | ||
| 46 | "title": "Multicast Packets ({{PI}})", | ||
| 47 | "vertical": "Packets/s", | ||
| 48 | "type": "stacked", | ||
| 49 | "legend": { | ||
| 50 | "value": { | ||
| 51 | "name": "Packets", | ||
| 52 | "color": "0000ff" | ||
| 53 | } | ||
| 54 | }, | ||
| 55 | "legend_format": "%5.1lf%s" | ||
| 56 | }, | ||
| 57 | "if_octets": { | ||
| 58 | "title": "Interface Traffic ({{PI}})", | ||
| 59 | "vertical": "{{ND}}/second", | ||
| 60 | "type": "io", | ||
| 61 | "legend": { | ||
| 62 | "rx": { | ||
| 63 | "name": "Receive", | ||
| 64 | "color": "0000ff" | ||
| 65 | }, | ||
| 66 | "tx": { | ||
| 67 | "name": "Transmit", | ||
| 68 | "color": "00b000" | ||
| 69 | } | ||
| 70 | }, | ||
| 71 | "legend_format": "%5.1lf%s", | ||
| 72 | "datasize": true | ||
| 73 | }, | ||
| 74 | "if_packets": { | ||
| 75 | "title": "Interface Packets ({{PI}})", | ||
| 76 | "vertical": "Packets/s", | ||
| 77 | "type": "io", | ||
| 78 | "legend": { | ||
| 79 | "rx": { | ||
| 80 | "name": "Receive", | ||
| 81 | "color": "0000ff" | ||
| 82 | }, | ||
| 83 | "tx": { | ||
| 84 | "name": "Transmit", | ||
| 85 | "color": "00b000" | ||
| 86 | } | ||
| 87 | }, | ||
| 88 | "legend_format": "%5.1lf%s" | ||
| 89 | }, | ||
| 90 | "if_rx_errors": { | ||
| 91 | "title": "Interface receive errors ({{PI}})", | ||
| 92 | "vertical": "Errors/s", | ||
| 93 | "type": "stacked", | ||
| 94 | "legend": { | ||
| 95 | "crc": { | ||
| 96 | "name": "CRC", | ||
| 97 | "color": "00e000" | ||
| 98 | }, | ||
| 99 | "fifo": { | ||
| 100 | "name": "FiFo", | ||
| 101 | "color": "f000c0" | ||
| 102 | }, | ||
| 103 | "frame": { | ||
| 104 | "name": "Frame", | ||
| 105 | "color": "ffb000" | ||
| 106 | }, | ||
| 107 | "length": { | ||
| 108 | "name": "Lenght", | ||
| 109 | "color": "f00000" | ||
| 110 | }, | ||
| 111 | "missed": { | ||
| 112 | "name": "Missed", | ||
| 113 | "color": "0000f0" | ||
| 114 | }, | ||
| 115 | "over": { | ||
| 116 | "name": "Over", | ||
| 117 | "color": "00e0ff" | ||
| 118 | } | ||
| 119 | }, | ||
| 120 | "legend_format": "%5.1lf%s" | ||
| 121 | }, | ||
| 122 | "if_tx_errors": { | ||
| 123 | "title": "Interface transmit errors ({{PI}})", | ||
| 124 | "vertical": "Errors/s", | ||
| 125 | "type": "stacked", | ||
| 126 | "legend": { | ||
| 127 | "aborted": { | ||
| 128 | "name": "Aborted", | ||
| 129 | "color": "f00000" | ||
| 130 | }, | ||
| 131 | "carrier": { | ||
| 132 | "name": "Carrier", | ||
| 133 | "color": "00e0ff" | ||
| 134 | }, | ||
| 135 | "fifo": { | ||
| 136 | "name": "FiFo", | ||
| 137 | "color": "00e000" | ||
| 138 | }, | ||
| 139 | "heartbeat": { | ||
| 140 | "name": "Heartbeat", | ||
| 141 | "color": "ffb000" | ||
| 142 | }, | ||
| 143 | "window": { | ||
| 144 | "name": "Window", | ||
| 145 | "color": "f000c0" | ||
| 146 | } | ||
| 147 | }, | ||
| 148 | "legend_format": "%5.1lf%s" | ||
| 149 | } | ||
| 150 | } | ||
| 151 | |||
diff --git a/plugin/netlink.php b/plugin/netlink.php deleted file mode 100644 index 9ddaee8..0000000 --- a/plugin/netlink.php +++ /dev/null | |||
| @@ -1,122 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Netlink Plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 9 | |||
| 10 | $obj->rrd_format = '%5.1lf%s'; | ||
| 11 | |||
| 12 | switch($obj->args['type']) { | ||
| 13 | case 'if_collisions': | ||
| 14 | $obj->data_sources = array('value'); | ||
| 15 | $obj->legend = array('value' => 'Collisions'); | ||
| 16 | $obj->colors = array('value' => '0000ff'); | ||
| 17 | $obj->rrd_title = sprintf('Collisions (%s)', $obj->args['pinstance']); | ||
| 18 | $obj->rrd_vertical = 'Collisions/s'; | ||
| 19 | break; | ||
| 20 | case 'if_dropped': | ||
| 21 | $obj->data_sources = array('rx', 'tx'); | ||
| 22 | $obj->legend = array( | ||
| 23 | 'rx' => 'Receive', | ||
| 24 | 'tx' => 'Transmit', | ||
| 25 | ); | ||
| 26 | $obj->colors = array( | ||
| 27 | 'rx' => '0000ff', | ||
| 28 | 'tx' => '00b000', | ||
| 29 | ); | ||
| 30 | $obj->rrd_title = sprintf('Dropped Packets (%s)', $obj->args['pinstance']); | ||
| 31 | $obj->rrd_vertical = 'Packets/s'; | ||
| 32 | break; | ||
| 33 | case 'if_errors': | ||
| 34 | $obj->data_sources = array('rx', 'tx'); | ||
| 35 | $obj->legend = array( | ||
| 36 | 'rx' => 'Receive', | ||
| 37 | 'tx' => 'Transmit', | ||
| 38 | ); | ||
| 39 | $obj->colors = array( | ||
| 40 | 'rx' => '0000ff', | ||
| 41 | 'tx' => '00b000', | ||
| 42 | ); | ||
| 43 | $obj->rrd_title = sprintf('Interface Errors (%s)', $obj->args['pinstance']); | ||
| 44 | $obj->rrd_vertical = 'Errors/s'; | ||
| 45 | break; | ||
| 46 | case 'if_multicast': | ||
| 47 | $obj->data_sources = array('value'); | ||
| 48 | $obj->legend = array('value' => 'Packets'); | ||
| 49 | $obj->colors = array('value' => '0000ff'); | ||
| 50 | $obj->rrd_title = sprintf('Multicast Packets (%s)', $obj->args['pinstance']); | ||
| 51 | $obj->rrd_vertical = 'Packets/s'; | ||
| 52 | break; | ||
| 53 | case 'if_octets': | ||
| 54 | $obj->data_sources = array('rx', 'tx'); | ||
| 55 | $obj->legend = array( | ||
| 56 | 'rx' => 'Receive', | ||
| 57 | 'tx' => 'Transmit', | ||
| 58 | ); | ||
| 59 | $obj->colors = array( | ||
| 60 | 'rx' => '0000ff', | ||
| 61 | 'tx' => '00b000', | ||
| 62 | ); | ||
| 63 | $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args['pinstance']); | ||
| 64 | $obj->rrd_vertical = sprintf('%s/s', ucfirst($CONFIG['network_datasize'])); | ||
| 65 | $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; | ||
| 66 | break; | ||
| 67 | case 'if_packets': | ||
| 68 | $obj->data_sources = array('rx', 'tx'); | ||
| 69 | $obj->legend = array( | ||
| 70 | 'rx' => 'Receive', | ||
| 71 | 'tx' => 'Transmit', | ||
| 72 | ); | ||
| 73 | $obj->colors = array( | ||
| 74 | 'rx' => '0000ff', | ||
| 75 | 'tx' => '00b000', | ||
| 76 | ); | ||
| 77 | $obj->rrd_title = sprintf('Interface Packets (%s)', $obj->args['pinstance']); | ||
| 78 | $obj->rrd_vertical = 'Packets/s'; | ||
| 79 | break; | ||
| 80 | case 'if_rx_errors': | ||
| 81 | $obj->data_sources = array('value'); | ||
| 82 | $obj->legend = array( | ||
| 83 | 'crc' => 'CRC', | ||
| 84 | 'fifo' => 'FiFo', | ||
| 85 | 'frame' => 'Frame', | ||
| 86 | 'length' => 'Lenght', | ||
| 87 | 'missed' => 'Missed', | ||
| 88 | 'over' => 'Over', | ||
| 89 | ); | ||
| 90 | $obj->colors = array( | ||
| 91 | 'crc' => '00e000', | ||
| 92 | 'fifo' => 'f000c0', | ||
| 93 | 'frame' => 'ffb000', | ||
| 94 | 'length' => 'f00000', | ||
| 95 | 'missed' => '0000f0', | ||
| 96 | 'over' => '00e0ff', | ||
| 97 | ); | ||
| 98 | $obj->rrd_title = sprintf('Interface receive errors (%s)', $obj->args['pinstance']); | ||
| 99 | $obj->rrd_vertical = 'Errors/s'; | ||
| 100 | break; | ||
| 101 | case 'if_tx_errors': | ||
| 102 | $obj->data_sources = array('value'); | ||
| 103 | $obj->legend = array( | ||
| 104 | 'aborted' => 'Aborted', | ||
| 105 | 'carrier' => 'Carrier', | ||
| 106 | 'fifo' => 'FiFo', | ||
| 107 | 'heartbeat'=> 'Heartbeat', | ||
| 108 | 'window' => 'Window', | ||
| 109 | ); | ||
| 110 | $obj->colors = array( | ||
| 111 | 'aborted' => 'f00000', | ||
| 112 | 'carrier' => '00e0ff', | ||
| 113 | 'fifo' => '00e000', | ||
| 114 | 'heartbeat'=> 'ffb000', | ||
| 115 | 'window' => 'f000c0', | ||
| 116 | ); | ||
| 117 | $obj->rrd_title = sprintf('Interface transmit errors (%s)', $obj->args['pinstance']); | ||
| 118 | $obj->rrd_vertical = 'Errors/s'; | ||
| 119 | break; | ||
| 120 | } | ||
| 121 | |||
| 122 | $obj->rrd_graph(); | ||
diff --git a/plugin/nfs.json b/plugin/nfs.json new file mode 100644 index 0000000..372d222 --- /dev/null +++ b/plugin/nfs.json | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | { | ||
| 2 | "nfs_procedure": { | ||
| 3 | "title": "NFS-{{PI}} Procedures", | ||
| 4 | "vertical": "Procedures", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend_format": "%5.2lf" | ||
| 7 | } | ||
| 8 | } | ||
diff --git a/plugin/nfs.php b/plugin/nfs.php deleted file mode 100644 index 612580c..0000000 --- a/plugin/nfs.php +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd NFS plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | |||
| 9 | # Check http://github.com/octo/collectd/blob/master/src/nfs.c | ||
| 10 | |||
| 11 | ## LAYOUT | ||
| 12 | # nfs-XX/nfs_procedure-YY.rrd | ||
| 13 | |||
| 14 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 15 | $obj->data_sources = array('value'); | ||
| 16 | switch($obj->args['pinstance']) { | ||
| 17 | case 'v2client': | ||
| 18 | $obj->order = array('create', 'fsstat', 'getattr', 'link', 'lookup', 'mkdir', 'null', 'readdir', 'readlink', 'read', 'remove', 'rename', 'rmdir', 'root', 'setattr', 'symlink', 'wrcache', 'write'); | ||
| 19 | break; | ||
| 20 | |||
| 21 | case 'v3client': | ||
| 22 | $obj->order = array('access', 'commit', 'create', 'fsinfo', 'fsstat', 'getattr', 'link', 'lookup', 'mkdir', 'mknod', 'null', 'pathconf', 'read', 'readdir', 'readdirplus', 'readlink', 'remove', 'rename', 'rmdir', 'setattr', 'symlink', 'write'); | ||
| 23 | break; | ||
| 24 | } | ||
| 25 | |||
| 26 | |||
| 27 | $obj->rrd_title = sprintf('NFS-%s Procedures', $obj->args['pinstance']); | ||
| 28 | $obj->rrd_vertical = 'Procedures'; | ||
| 29 | $obj->rrd_format = '%5.2lf'; | ||
| 30 | |||
| 31 | $obj->rrd_graph(); | ||
diff --git a/plugin/nginx.json b/plugin/nginx.json new file mode 100644 index 0000000..08e1d40 --- /dev/null +++ b/plugin/nginx.json | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | { | ||
| 2 | "connections": { | ||
| 3 | "title": "Nginx connections", | ||
| 4 | "vertical": "Connections/s", | ||
| 5 | "legend": { | ||
| 6 | "accepted": { | ||
| 7 | "name": "Accepted", | ||
| 8 | "color": "ff0000" | ||
| 9 | }, | ||
| 10 | "handled": { | ||
| 11 | "name": "Handled", | ||
| 12 | "color": "0000ff" | ||
| 13 | } | ||
| 14 | }, | ||
| 15 | "legend_format": "%5.1lf%s" | ||
| 16 | }, | ||
| 17 | "nginx_connections": { | ||
| 18 | "title": "Nginx connection states", | ||
| 19 | "vertical": "Connections/s", | ||
| 20 | "legend": { | ||
| 21 | "active": { | ||
| 22 | "name": "Active", | ||
| 23 | "color": "005d57" | ||
| 24 | }, | ||
| 25 | "reading": { | ||
| 26 | "name": "Reading", | ||
| 27 | "color": "4444ff" | ||
| 28 | }, | ||
| 29 | "waiting": { | ||
| 30 | "name": "Waiting", | ||
| 31 | "color": "f24ac8" | ||
| 32 | }, | ||
| 33 | "writing": { | ||
| 34 | "name": "Writing", | ||
| 35 | "color": "00cf00" | ||
| 36 | } | ||
| 37 | }, | ||
| 38 | "legend_format": "%5.1lf%s" | ||
| 39 | }, | ||
| 40 | "nginx_requests": { | ||
| 41 | "title": "Nginx requests", | ||
| 42 | "vertical": "Requests/s", | ||
| 43 | "legend": { | ||
| 44 | "value": { | ||
| 45 | "name": "Requests", | ||
| 46 | "color": "00aa00" | ||
| 47 | } | ||
| 48 | }, | ||
| 49 | "legend_format": "%5.1lf%s" | ||
| 50 | } | ||
| 51 | } | ||
diff --git a/plugin/nginx.php b/plugin/nginx.php deleted file mode 100644 index cbb0fa4..0000000 --- a/plugin/nginx.php +++ /dev/null | |||
| @@ -1,66 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd nginx plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # nginx/ | ||
| 10 | # nginx/connections-accepted.rrd | ||
| 11 | # nginx/connections-handled.rrd | ||
| 12 | # nginx/nginx_connections-active.rrd | ||
| 13 | # nginx/nginx_connections-reading.rrd | ||
| 14 | # nginx/nginx_connections-waiting.rrd | ||
| 15 | # nginx/nginx_connections-writing.rrd | ||
| 16 | # nginx/nginx_requests.rrd | ||
| 17 | |||
| 18 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 19 | |||
| 20 | switch($obj->args['type']) | ||
| 21 | { | ||
| 22 | case 'connections': | ||
| 23 | $obj->order = array('accepted', 'handled'); | ||
| 24 | $obj->legend = array( | ||
| 25 | 'accepted' => 'Accepted', | ||
| 26 | 'handled' => 'Handled', | ||
| 27 | ); | ||
| 28 | $obj->colors = array( | ||
| 29 | 'accepted' => 'ff0000', | ||
| 30 | 'handled' => '0000ff', | ||
| 31 | ); | ||
| 32 | $obj->rrd_title = sprintf('nginx connections'); | ||
| 33 | $obj->rrd_vertical = 'Connections/s'; | ||
| 34 | break; | ||
| 35 | case 'nginx_connections': | ||
| 36 | $obj->order = array('active', 'reading', 'waiting', 'writing'); | ||
| 37 | $obj->legend = array( | ||
| 38 | 'active' => 'Active', | ||
| 39 | 'reading' => 'Reading', | ||
| 40 | 'waiting' => 'Waiting', | ||
| 41 | 'writing' => 'Writing', | ||
| 42 | ); | ||
| 43 | $obj->colors = array( | ||
| 44 | 'active' => '005d57', | ||
| 45 | 'reading' => '4444ff', | ||
| 46 | 'waiting' => 'f24ac8', | ||
| 47 | 'writing' => '00cf00', | ||
| 48 | ); | ||
| 49 | $obj->rrd_title = sprintf('nginx connections'); | ||
| 50 | $obj->rrd_vertical = 'Connections/s'; | ||
| 51 | break; | ||
| 52 | case 'nginx_requests': | ||
| 53 | $obj->legend = array( | ||
| 54 | 'value' => 'Requests', | ||
| 55 | ); | ||
| 56 | $obj->colors = array( | ||
| 57 | 'value' => '00aa00', | ||
| 58 | ); | ||
| 59 | $obj->rrd_title = sprintf('nginx requests'); | ||
| 60 | $obj->rrd_vertical = 'Requests per second'; | ||
| 61 | break; | ||
| 62 | } | ||
| 63 | |||
| 64 | $obj->rrd_format = '%5.1lf%s'; | ||
| 65 | |||
| 66 | $obj->rrd_graph(); | ||
diff --git a/plugin/ntpd.json b/plugin/ntpd.json new file mode 100644 index 0000000..f7ec918 --- /dev/null +++ b/plugin/ntpd.json | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | { | ||
| 2 | "delay": { | ||
| 3 | "title": "Delay", | ||
| 4 | "vertical": "Seconds", | ||
| 5 | "legend_format": "%5.1lf%s" | ||
| 6 | }, | ||
| 7 | "frequency_offset": { | ||
| 8 | "title": "Frequency offset", | ||
| 9 | "vertical": "ppm", | ||
| 10 | "legend_format": "%5.1lf%s" | ||
| 11 | }, | ||
| 12 | "time_dispersion": { | ||
| 13 | "title": "Time dispersion", | ||
| 14 | "vertical": "Seconds", | ||
| 15 | "legend_format": "%5.1lf%s" | ||
| 16 | }, | ||
| 17 | "time_offset": { | ||
| 18 | "title": "Time offset", | ||
| 19 | "vertical": "Seconds", | ||
| 20 | "legend_format": "%5.1lf%s" | ||
| 21 | } | ||
| 22 | } | ||
diff --git a/plugin/ntpd.php b/plugin/ntpd.php deleted file mode 100644 index ceea1db..0000000 --- a/plugin/ntpd.php +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd NTPD plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # ntpd/ | ||
| 10 | # ntpd/delay-<host>.rrd | ||
| 11 | # ntpd/frequency_offset-loop.rrd | ||
| 12 | # ntpd/time_dispersion-<host>.rrd | ||
| 13 | # ntpd/time_offset-<host>.rrd | ||
| 14 | |||
| 15 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 16 | $obj->legend = array('ping' => 'Ping time', | ||
| 17 | 'ping_stddev' => 'Ping stddev', | ||
| 18 | 'ping_droprate' => 'Ping droprate'); | ||
| 19 | $obj->rrd_format = '%5.1lf%s'; | ||
| 20 | |||
| 21 | switch($obj->args['type']) { | ||
| 22 | case 'delay': | ||
| 23 | if ($CONFIG['version'] < 5) | ||
| 24 | $obj->data_sources = array('seconds'); | ||
| 25 | $obj->rrd_title = sprintf('Delay'); | ||
| 26 | $obj->rrd_vertical = 'Seconds'; | ||
| 27 | break; | ||
| 28 | case 'frequency_offset': | ||
| 29 | if ($CONFIG['version'] < 5) | ||
| 30 | $obj->data_sources = array('ppm'); | ||
| 31 | $obj->rrd_title = 'Frequency offset'; | ||
| 32 | $obj->rrd_vertical = 'ppm'; | ||
| 33 | break; | ||
| 34 | case 'time_dispersion': | ||
| 35 | if ($CONFIG['version'] < 5) | ||
| 36 | $obj->data_sources = array('seconds'); | ||
| 37 | $obj->rrd_title = 'Time dispersion'; | ||
| 38 | $obj->rrd_vertical = 'Seconds'; | ||
| 39 | break; | ||
| 40 | case 'time_offset': | ||
| 41 | if ($CONFIG['version'] < 5) | ||
| 42 | $obj->data_sources = array('seconds'); | ||
| 43 | $obj->rrd_title = 'Time offset'; | ||
| 44 | $obj->rrd_vertical = 'Seconds'; | ||
| 45 | break; | ||
| 46 | } | ||
| 47 | |||
| 48 | $obj->rrd_graph(); | ||
diff --git a/plugin/nut.json b/plugin/nut.json new file mode 100644 index 0000000..c5bcbca --- /dev/null +++ b/plugin/nut.json | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | { | ||
| 2 | "frequency": { | ||
| 3 | "title": "Frequency ({{PI}})", | ||
| 4 | "vertical": "Hz", | ||
| 5 | "legend_format": "%5.1lf%s" | ||
| 6 | }, | ||
| 7 | "percent": { | ||
| 8 | "title": "Charge & load ({{PI}})", | ||
| 9 | "vertical": "Percent", | ||
| 10 | "legend_format": "%5.1lf" | ||
| 11 | }, | ||
| 12 | "power": { | ||
| 13 | "title": "Power ({{PI}})", | ||
| 14 | "vertical": "VA", | ||
| 15 | "legend_format": "%5.1lf%s" | ||
| 16 | }, | ||
| 17 | "temperature": { | ||
| 18 | "title": "Temperature ({{PI}})", | ||
| 19 | "vertical": "°C", | ||
| 20 | "legend_format": "%5.1lf%s" | ||
| 21 | }, | ||
| 22 | "timeleft": { | ||
| 23 | "title": "Time Left ({{PI}})", | ||
| 24 | "vertical": "Seconds", | ||
| 25 | "legend_format": "%5.1lf" | ||
| 26 | }, | ||
| 27 | "voltage": { | ||
| 28 | "title": "Voltage {{PI}}", | ||
| 29 | "vertical": "Voltage", | ||
| 30 | "legend_format": "%5.1lf" | ||
| 31 | } | ||
| 32 | } | ||
diff --git a/plugin/nut.php b/plugin/nut.php deleted file mode 100644 index eb2ceb2..0000000 --- a/plugin/nut.php +++ /dev/null | |||
| @@ -1,77 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd NUT plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # nut-XXXX/ | ||
| 10 | # nut-XXXX/frequency-XXXX.rrd | ||
| 11 | # nut-XXXX/percent-XXXX.rrd | ||
| 12 | # nut-XXXX/temerature-XXXX.rrd | ||
| 13 | # nut-XXXX/timeleft-XXXX.rrd | ||
| 14 | # nut-XXXX/voltage-XXXX.rrd | ||
| 15 | |||
| 16 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 17 | switch($obj->args['type']) { | ||
| 18 | case 'frequency': | ||
| 19 | if ($CONFIG['version'] < 5) { | ||
| 20 | $obj->data_sources = array('frequency'); | ||
| 21 | } else { | ||
| 22 | $obj->data_sources = array('value'); | ||
| 23 | } | ||
| 24 | $obj->legend = array('output' => 'Output'); | ||
| 25 | $obj->rrd_title = sprintf('Frequency (%s)', $obj->args['pinstance']); | ||
| 26 | $obj->rrd_vertical = 'Hz'; | ||
| 27 | $obj->rrd_format = '%5.1lf%s'; | ||
| 28 | break; | ||
| 29 | case 'percent': | ||
| 30 | if ($CONFIG['version'] < 5) { | ||
| 31 | $obj->data_sources = array('percent'); | ||
| 32 | } else { | ||
| 33 | $obj->data_sources = array('value'); | ||
| 34 | } | ||
| 35 | $obj->legend = array('charge' => 'Charge', | ||
| 36 | 'load' => 'Load'); | ||
| 37 | $obj->rrd_title = sprintf('Charge & load (%s)', $obj->args['pinstance']); | ||
| 38 | $obj->rrd_vertical = '%'; | ||
| 39 | $obj->rrd_format = '%5.1lf'; | ||
| 40 | break; | ||
| 41 | case 'power': | ||
| 42 | $obj->data_sources = array('value'); | ||
| 43 | $obj->legend = array('ups' => 'UPS'); | ||
| 44 | $obj->rrd_title = sprintf('Power (%s)', $obj->args['pinstance']); | ||
| 45 | $obj->rrd_vertical = 'VA'; | ||
| 46 | $obj->rrd_format = '%5.1lf%s'; | ||
| 47 | break; | ||
| 48 | case 'temperature': | ||
| 49 | $obj->data_sources = array('value'); | ||
| 50 | $obj->legend = array('battery' => 'Battery'); | ||
| 51 | $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); | ||
| 52 | $obj->rrd_vertical = '°C'; | ||
| 53 | $obj->rrd_format = '%5.1lf%s'; | ||
| 54 | break; | ||
| 55 | case 'timeleft': | ||
| 56 | if ($CONFIG['version'] < 5) { | ||
| 57 | $obj->data_sources = array('timeleft'); | ||
| 58 | } else { | ||
| 59 | $obj->data_sources = array('value'); | ||
| 60 | } | ||
| 61 | $obj->legend = array('timeleft' => 'Timeleft'); | ||
| 62 | $obj->rrd_title = sprintf('Timeleft (%s)', $obj->args['pinstance']); | ||
| 63 | $obj->rrd_vertical = 'Seconds'; | ||
| 64 | $obj->rrd_format = '%5.1lf'; | ||
| 65 | break; | ||
| 66 | case 'voltage': | ||
| 67 | $obj->data_sources = array('value'); | ||
| 68 | $obj->legend = array('battery' => 'Battery', | ||
| 69 | 'input' => 'Input', | ||
| 70 | 'output' => 'Output'); | ||
| 71 | $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']); | ||
| 72 | $obj->rrd_vertical = 'Volts'; | ||
| 73 | $obj->rrd_format = '%5.1lf'; | ||
| 74 | break; | ||
| 75 | } | ||
| 76 | |||
| 77 | $obj->rrd_graph(); | ||
diff --git a/plugin/openvpn.json b/plugin/openvpn.json new file mode 100644 index 0000000..aa731c4 --- /dev/null +++ b/plugin/openvpn.json | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | { | ||
| 2 | "if_octets": { | ||
| 3 | "title": "Traffic ({{PI}})", | ||
| 4 | "vertical": "{{ND}} per second", | ||
| 5 | "type": "io", | ||
| 6 | "legend": { | ||
| 7 | "rx": { | ||
| 8 | "name": "Receive", | ||
| 9 | "color": "0000ff" | ||
| 10 | }, | ||
| 11 | "tx": { | ||
| 12 | "name": "Transmit", | ||
| 13 | "color": "00b000" | ||
| 14 | } | ||
| 15 | }, | ||
| 16 | "legend_format": "%5.1lf%s", | ||
| 17 | "datasize": true | ||
| 18 | }, | ||
| 19 | "users": { | ||
| 20 | "title": "Users ({{PI}})", | ||
| 21 | "vertical": "Users", | ||
| 22 | "legend": { | ||
| 23 | "value": { | ||
| 24 | "name": "Users", | ||
| 25 | "color": "0000f0" | ||
| 26 | } | ||
| 27 | }, | ||
| 28 | "legend_format": "%.1lf" | ||
| 29 | } | ||
| 30 | } | ||
diff --git a/plugin/openvpn.php b/plugin/openvpn.php deleted file mode 100644 index 6eba3d5..0000000 --- a/plugin/openvpn.php +++ /dev/null | |||
| @@ -1,42 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd OpenVPN plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | |||
| 7 | ## LAYOUT | ||
| 8 | # openvpn-XXXX/ | ||
| 9 | # openvpn-XXXX/if_octets-XXXX.rrd | ||
| 10 | # openvpn-XXXX/users-XXXX.rrd | ||
| 11 | |||
| 12 | switch(GET('t')) { | ||
| 13 | case 'if_octets': | ||
| 14 | require_once 'type/GenericIO.class.php'; | ||
| 15 | $obj = new Type_GenericIO($CONFIG, $_GET); | ||
| 16 | $obj->data_sources = array('rx', 'tx'); | ||
| 17 | $obj->legend = array( | ||
| 18 | 'rx' => 'Receive', | ||
| 19 | 'tx' => 'Transmit', | ||
| 20 | ); | ||
| 21 | $obj->colors = array( | ||
| 22 | 'rx' => '0000ff', | ||
| 23 | 'tx' => '00b000', | ||
| 24 | ); | ||
| 25 | $obj->rrd_title = sprintf('Traffic (%s)', $obj->args['pinstance']); | ||
| 26 | $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize'])); | ||
| 27 | $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; | ||
| 28 | $obj->rrd_format = '%5.1lf%s'; | ||
| 29 | break; | ||
| 30 | case 'users': | ||
| 31 | require_once 'type/Default.class.php'; | ||
| 32 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 33 | $obj->legend = array( | ||
| 34 | 'value' => 'Users', | ||
| 35 | ); | ||
| 36 | $obj->rrd_title = sprintf('Users (%s)', $obj->args['pinstance']); | ||
| 37 | $obj->rrd_vertical = 'Users'; | ||
| 38 | $obj->rrd_format = '%.1lf'; | ||
| 39 | break; | ||
| 40 | } | ||
| 41 | |||
| 42 | $obj->rrd_graph(); | ||
diff --git a/plugin/ping.json b/plugin/ping.json new file mode 100644 index 0000000..ba6d67e --- /dev/null +++ b/plugin/ping.json | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | { | ||
| 2 | "ping": { | ||
| 3 | "title": "Ping latency", | ||
| 4 | "vertical": "Milliseconds", | ||
| 5 | "legend_format": "%5.1lf" | ||
| 6 | }, | ||
| 7 | "ping_stddev": { | ||
| 8 | "title": "Ping standard deviation", | ||
| 9 | "vertical": "Milliseconds", | ||
| 10 | "legend_format": "%5.1lf" | ||
| 11 | }, | ||
| 12 | "ping_droprate": { | ||
| 13 | "title": "Ping droprate", | ||
| 14 | "legend_format": "%5.1lf" | ||
| 15 | } | ||
| 16 | } | ||
diff --git a/plugin/ping.php b/plugin/ping.php deleted file mode 100644 index ca2920c..0000000 --- a/plugin/ping.php +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Ping plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # ping/ | ||
| 10 | # ping/ping-<host>.rrd | ||
| 11 | # ping/ping_stddev-<host>.rrd | ||
| 12 | # ping/ping_droprate-<host>.rrd | ||
| 13 | |||
| 14 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 15 | $obj->data_sources = array('value'); | ||
| 16 | $obj->legend = array('ping' => 'Ping time', | ||
| 17 | 'ping_stddev' => 'Ping stddev', | ||
| 18 | 'ping_droprate' => 'Ping droprate'); | ||
| 19 | $obj->rrd_format = '%5.1lf'; | ||
| 20 | |||
| 21 | switch($obj->args['type']) { | ||
| 22 | case 'ping': | ||
| 23 | if ($CONFIG['version'] < 5) | ||
| 24 | $obj->data_sources = array('ping'); | ||
| 25 | $obj->rrd_title = 'Ping latency'; | ||
| 26 | $obj->rrd_vertical = 'Milliseconds'; | ||
| 27 | break; | ||
| 28 | case 'ping_stddev': | ||
| 29 | $obj->rrd_title = 'Ping standard deviation'; | ||
| 30 | $obj->rrd_vertical = 'Milliseconds'; | ||
| 31 | break; | ||
| 32 | case 'ping_droprate': | ||
| 33 | $obj->rrd_title = 'Ping droprate'; | ||
| 34 | break; | ||
| 35 | } | ||
| 36 | |||
| 37 | $obj->rrd_graph(); | ||
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 | } | ||
diff --git a/plugin/postgresql.php b/plugin/postgresql.php deleted file mode 100644 index 4cfae41..0000000 --- a/plugin/postgresql.php +++ /dev/null | |||
| @@ -1,130 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Postgresql plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # postgresql-X/pg_blks-heap_hit.rrd | ||
| 10 | # postgresql-X/pg_blks-heap_read.rrd | ||
| 11 | # postgresql-X/pg_blks-idx_hit.rrd | ||
| 12 | # postgresql-X/pg_blks-idx_read.rrd | ||
| 13 | # postgresql-X/pg_blks-tidx_hit.rrd | ||
| 14 | # postgresql-X/pg_blks-tidx_read.rrd | ||
| 15 | # postgresql-X/pg_blks-toast_hit.rrd | ||
| 16 | # postgresql-X/pg_blks-toast_read.rrd | ||
| 17 | # postgresql-X/pg_db_size.rrd | ||
| 18 | # postgresql-X/pg_n_tup_c-del.rrd | ||
| 19 | # postgresql-X/pg_n_tup_c-hot_upd.rrd | ||
| 20 | # postgresql-X/pg_n_tup_c-ins.rrd | ||
| 21 | # postgresql-X/pg_n_tup_c-upd.rrd | ||
| 22 | |||
| 23 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 24 | $obj->rrd_format = '%5.1lf%s'; | ||
| 25 | |||
| 26 | switch($obj->args['type']) { | ||
| 27 | case 'pg_blks': | ||
| 28 | $obj->legend = array( | ||
| 29 | 'heap_hit' => 'Heap hit', | ||
| 30 | 'heap_read' => 'Heap read', | ||
| 31 | 'idx_hit' => 'Index hit', | ||
| 32 | 'idx_read' => 'Index read', | ||
| 33 | 'tidx_hit' => 'Toast index hit', | ||
| 34 | 'tidx_read' => 'Toast index read', | ||
| 35 | 'toast_hit' => 'Toast hit', | ||
| 36 | 'toast_read' => 'Toast read', | ||
| 37 | ); | ||
| 38 | $obj->rrd_title = sprintf('PostgreSQL Disk I/O (%s)', | ||
| 39 | !empty($obj->args['pinstance']) ? $obj->args['pinstance'] : ''); | ||
| 40 | $obj->rrd_vertical = 'Blocks'; | ||
| 41 | break; | ||
| 42 | case 'pg_db_size': | ||
| 43 | $obj->legend = array( | ||
| 44 | 'value' => 'Size', | ||
| 45 | ); | ||
| 46 | $obj->colors = array( | ||
| 47 | 'value' => '0000ff', | ||
| 48 | ); | ||
| 49 | $obj->rrd_title = sprintf('PostgreSQL DB size (%s)', | ||
| 50 | !empty($obj->args['pinstance']) ? $obj->args['pinstance'] : ''); | ||
| 51 | $obj->rrd_vertical = 'Bytes'; | ||
| 52 | break; | ||
| 53 | case 'pg_n_tup_c': | ||
| 54 | $obj->order = array( | ||
| 55 | 'ins', | ||
| 56 | 'upd', | ||
| 57 | 'hot_upd', | ||
| 58 | 'del', | ||
| 59 | ); | ||
| 60 | $obj->legend = array( | ||
| 61 | 'ins' => 'Insert', | ||
| 62 | 'upd' => 'Update', | ||
| 63 | 'hot_upd' => 'Hot Update', | ||
| 64 | 'del' => 'Delete', | ||
| 65 | ); | ||
| 66 | $obj->colors = array( | ||
| 67 | 'ins' => '00ff00', | ||
| 68 | 'upd' => 'ff7c00', | ||
| 69 | 'hot_upd' => '0000ff', | ||
| 70 | 'del' => 'ff0000', | ||
| 71 | ); | ||
| 72 | $obj->rrd_title = sprintf('PostgreSQL Row actions (%s)', | ||
| 73 | !empty($obj->args['pinstance']) ? $obj->args['pinstance'] : ''); | ||
| 74 | $obj->rrd_vertical = 'Rows'; | ||
| 75 | break; | ||
| 76 | case 'pg_n_tup_g': | ||
| 77 | $obj->order = array('live', 'dead'); | ||
| 78 | $obj->legend = array( | ||
| 79 | 'live' => 'Live', | ||
| 80 | 'dead' => 'Dead', | ||
| 81 | ); | ||
| 82 | $obj->colors = array( | ||
| 83 | 'live' => '00ff00', | ||
| 84 | 'dead' => 'ff0000', | ||
| 85 | ); | ||
| 86 | $obj->rrd_title = sprintf('PostgreSQL Table states (%s)', | ||
| 87 | !empty($obj->args['pinstance']) ? $obj->args['pinstance'] : ''); | ||
| 88 | $obj->rrd_vertical = 'Rows'; | ||
| 89 | break; | ||
| 90 | case 'pg_numbackends': | ||
| 91 | $obj->legend = array( | ||
| 92 | 'value' => 'Backends', | ||
| 93 | ); | ||
| 94 | $obj->colors = array( | ||
| 95 | 'value' => '0000ff', | ||
| 96 | ); | ||
| 97 | $obj->rrd_title = sprintf('PostgreSQL Backends (%s)', | ||
| 98 | !empty($obj->args['pinstance']) ? $obj->args['pinstance'] : ''); | ||
| 99 | $obj->rrd_vertical = 'Number'; | ||
| 100 | break; | ||
| 101 | case 'pg_scan': | ||
| 102 | $obj->legend = array( | ||
| 103 | 'seq' => 'Sequential', | ||
| 104 | 'seq_tup_read' => 'Sequential rows', | ||
| 105 | 'idx' => 'Index', | ||
| 106 | 'idx_tup_fetch' => 'Index Rows', | ||
| 107 | ); | ||
| 108 | $obj->rrd_title = sprintf('PostgreSQL Scans (%s)', | ||
| 109 | !empty($obj->args['pinstance']) ? $obj->args['pinstance'] : ''); | ||
| 110 | $obj->rrd_vertical = 'Scans / Rows'; | ||
| 111 | break; | ||
| 112 | case 'pg_xact': | ||
| 113 | $obj->legend = array( | ||
| 114 | 'commit' => 'Commit', | ||
| 115 | 'rollback' => 'Rollback', | ||
| 116 | ); | ||
| 117 | $obj->colors = array( | ||
| 118 | 'commit' => '00ff00', | ||
| 119 | 'rollback' => 'ff0000', | ||
| 120 | ); | ||
| 121 | $obj->rrd_title = sprintf('PostgreSQL Transactions (%s)', | ||
| 122 | !empty($obj->args['pinstance']) ? $obj->args['pinstance'] : ''); | ||
| 123 | $obj->rrd_vertical = 'Transactions'; | ||
| 124 | break; | ||
| 125 | default: | ||
| 126 | $obj->rrd_title = sprintf('%s/%s', $obj->args['pinstance'], $obj->args['type']); | ||
| 127 | break; | ||
| 128 | } | ||
| 129 | |||
| 130 | $obj->rrd_graph(); | ||
diff --git a/plugin/powerdns.php b/plugin/powerdns.php deleted file mode 100644 index d83d67b..0000000 --- a/plugin/powerdns.php +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd PowerDNS plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | |||
| 9 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 10 | |||
| 11 | $obj->rrd_title = sprintf('PowerDNS %s (%s)', $obj->args['type'], $obj->args['pinstance']); | ||
| 12 | $obj->rrd_format = '%5.1lf%s'; | ||
| 13 | |||
| 14 | $obj->rrd_graph(); | ||
diff --git a/plugin/processes.json b/plugin/processes.json new file mode 100644 index 0000000..9ffca72 --- /dev/null +++ b/plugin/processes.json | |||
| @@ -0,0 +1,186 @@ | |||
| 1 | { | ||
| 2 | "ps_state": { | ||
| 3 | "title": "Processes", | ||
| 4 | "vertical": "Processes", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend": { | ||
| 7 | "blocked": { | ||
| 8 | "name": "Blocked", | ||
| 9 | "color": "ff00ff" | ||
| 10 | }, | ||
| 11 | "paging": { | ||
| 12 | "name": "Paging", | ||
| 13 | "color": "ffb000" | ||
| 14 | }, | ||
| 15 | "running": { | ||
| 16 | "name": "Running", | ||
| 17 | "color": "00e000" | ||
| 18 | }, | ||
| 19 | "sleeping": { | ||
| 20 | "name": "Sleeping", | ||
| 21 | "color": "0000ff" | ||
| 22 | }, | ||
| 23 | "stopped": { | ||
| 24 | "name": "Stopped", | ||
| 25 | "color": "a000a0" | ||
| 26 | }, | ||
| 27 | "zombies": { | ||
| 28 | "name": "Zombies", | ||
| 29 | "color": "ff0000" | ||
| 30 | } | ||
| 31 | }, | ||
| 32 | "legend_format": "%5.1lf%s" | ||
| 33 | }, | ||
| 34 | "fork_rate": { | ||
| 35 | "title": "Fork rate", | ||
| 36 | "vertical": "forks/s", | ||
| 37 | "type": "stacked", | ||
| 38 | "legend": { | ||
| 39 | "value": { | ||
| 40 | "name": "Forks", | ||
| 41 | "color": "f0a000" | ||
| 42 | } | ||
| 43 | }, | ||
| 44 | "legend_format": "%5.1lf%s" | ||
| 45 | }, | ||
| 46 | "ps_code": { | ||
| 47 | "title": "Text Resident Set ({{PI}})", | ||
| 48 | "vertical": "Bytes", | ||
| 49 | "type": "stacked", | ||
| 50 | "legend": { | ||
| 51 | "value": { | ||
| 52 | "name": "TRS", | ||
| 53 | "color": "0000ff" | ||
| 54 | } | ||
| 55 | }, | ||
| 56 | "legend_format": "%5.1lf%s" | ||
| 57 | }, | ||
| 58 | "ps_count": { | ||
| 59 | "title": "Number of Processes/Threads ({{PI}})", | ||
| 60 | "vertical": "Amount", | ||
| 61 | "type": "stacked", | ||
| 62 | "legend": { | ||
| 63 | "processes": { | ||
| 64 | "name": "Processes", | ||
| 65 | "color": "0000ff" | ||
| 66 | }, | ||
| 67 | "threads": { | ||
| 68 | "name": "Threads", | ||
| 69 | "color": "ff0000" | ||
| 70 | } | ||
| 71 | }, | ||
| 72 | "legend_format": "%5.1lf%s" | ||
| 73 | }, | ||
| 74 | "ps_cputime": { | ||
| 75 | "title": "CPU time ({{PI}})", | ||
| 76 | "vertical": "CPU time [s]", | ||
| 77 | "type": "stacked", | ||
| 78 | "legend": { | ||
| 79 | "user": { | ||
| 80 | "name": "User", | ||
| 81 | "color": "0000ff" | ||
| 82 | }, | ||
| 83 | "syst": { | ||
| 84 | "name": "System", | ||
| 85 | "color": "ff0000" | ||
| 86 | } | ||
| 87 | }, | ||
| 88 | "legend_format": "%5.1lf%s" | ||
| 89 | }, | ||
| 90 | "ps_disk_octets": { | ||
| 91 | "title": "Disk Traffic ({{PI}})", | ||
| 92 | "vertical": "Bytes per second", | ||
| 93 | "type": "io", | ||
| 94 | "legend": { | ||
| 95 | "read": { | ||
| 96 | "name": "Read", | ||
| 97 | "color": "0000ff" | ||
| 98 | }, | ||
| 99 | "write": { | ||
| 100 | "name": "Write", | ||
| 101 | "color": "00b000" | ||
| 102 | } | ||
| 103 | }, | ||
| 104 | "legend_format": "%5.1lf%s" | ||
| 105 | }, | ||
| 106 | "ps_disk_ops": { | ||
| 107 | "title": "Disk Operations ({{PI}})", | ||
| 108 | "vertical": "Ops per second", | ||
| 109 | "type": "io", | ||
| 110 | "legend": { | ||
| 111 | "read": { | ||
| 112 | "name": "Read", | ||
| 113 | "color": "0000ff" | ||
| 114 | }, | ||
| 115 | "write": { | ||
| 116 | "name": "Write", | ||
| 117 | "color": "00b000" | ||
| 118 | } | ||
| 119 | }, | ||
| 120 | "legend_format": "%5.1lf%s" | ||
| 121 | }, | ||
| 122 | "ps_data": { | ||
| 123 | "title": "Data Resident Set ({{PI}})", | ||
| 124 | "vertical": "Bytes", | ||
| 125 | "type": "stacked", | ||
| 126 | "legend": { | ||
| 127 | "value": { | ||
| 128 | "name": "DRS", | ||
| 129 | "color": "0000ff" | ||
| 130 | } | ||
| 131 | }, | ||
| 132 | "legend_format": "%5.1lf%s" | ||
| 133 | }, | ||
| 134 | "ps_pagefaults": { | ||
| 135 | "title": "PageFaults ({{PI}})", | ||
| 136 | "vertical": "Pagefaults", | ||
| 137 | "type": "stacked", | ||
| 138 | "legend": { | ||
| 139 | "minflt": { | ||
| 140 | "name": "Minor", | ||
| 141 | "color": "ff0000" | ||
| 142 | }, | ||
| 143 | "majflt": { | ||
| 144 | "name": "Major", | ||
| 145 | "color": "0000ff" | ||
| 146 | } | ||
| 147 | }, | ||
| 148 | "legend_format": "%5.1lf%s" | ||
| 149 | }, | ||
| 150 | "ps_rss": { | ||
| 151 | "title": "Resident Segment Size ({{PI}})", | ||
| 152 | "vertical": "Bytes", | ||
| 153 | "type": "stacked", | ||
| 154 | "legend": { | ||
| 155 | "value": { | ||
| 156 | "name": "RSS", | ||
| 157 | "color": "0000ff" | ||
| 158 | } | ||
| 159 | }, | ||
| 160 | "legend_format": "%5.1lf%s" | ||
| 161 | }, | ||
| 162 | "ps_stacksize": { | ||
| 163 | "title": "Stacksize ({{PI}})", | ||
| 164 | "vertical": "Bytes", | ||
| 165 | "type": "stacked", | ||
| 166 | "legend": { | ||
| 167 | "value": { | ||
| 168 | "name": "Stacksize", | ||
| 169 | "color": "0000ff" | ||
| 170 | } | ||
| 171 | }, | ||
| 172 | "legend_format": "%5.1lf%s" | ||
| 173 | }, | ||
| 174 | "ps_vm": { | ||
| 175 | "title": "Virtual Memory ({{PI}})", | ||
| 176 | "vertical": "Bytes", | ||
| 177 | "type": "stacked", | ||
| 178 | "legend": { | ||
| 179 | "value": { | ||
| 180 | "name": "Memory", | ||
| 181 | "color": "0000ff" | ||
| 182 | } | ||
| 183 | }, | ||
| 184 | "legend_format": "%5.1lf%s" | ||
| 185 | } | ||
| 186 | } | ||
diff --git a/plugin/processes.php b/plugin/processes.php deleted file mode 100644 index 27819cc..0000000 --- a/plugin/processes.php +++ /dev/null | |||
| @@ -1,183 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd CPU plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # processes/ | ||
| 10 | # processes/ps_state-paging.rrd | ||
| 11 | # processes/ps_state-blocked.rrd | ||
| 12 | # processes/ps_state-zombies.rrd | ||
| 13 | # processes/ps_state-stopped.rrd | ||
| 14 | # processes/ps_state-running.rrd | ||
| 15 | # processes/ps_state-sleeping.rrd | ||
| 16 | |||
| 17 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 18 | $obj->rrd_format = '%5.1lf%s'; | ||
| 19 | |||
| 20 | switch($obj->args['type']) | ||
| 21 | { | ||
| 22 | case 'ps_state': | ||
| 23 | $obj->legend = array( | ||
| 24 | 'paging' => 'Paging', | ||
| 25 | 'blocked' => 'Blocked', | ||
| 26 | 'zombies' => 'Zombies', | ||
| 27 | 'stopped' => 'Stopped', | ||
| 28 | 'running' => 'Running', | ||
| 29 | 'sleeping' => 'Sleeping', | ||
| 30 | ); | ||
| 31 | $obj->colors = array( | ||
| 32 | 'paging' => 'ffb000', | ||
| 33 | 'blocked' => 'ff00ff', | ||
| 34 | 'zombies' => 'ff0000', | ||
| 35 | 'stopped' => 'a000a0', | ||
| 36 | 'running' => '00e000', | ||
| 37 | 'sleeping' => '0000ff', | ||
| 38 | 'value' => 'f0a000', | ||
| 39 | ); | ||
| 40 | $obj->rrd_title = 'Processes'; | ||
| 41 | $obj->rrd_vertical = 'Processes'; | ||
| 42 | break; | ||
| 43 | |||
| 44 | case 'fork_rate': | ||
| 45 | $obj->legend = array( | ||
| 46 | 'value' => 'Forks', | ||
| 47 | ); | ||
| 48 | $obj->colors = array( | ||
| 49 | 'value' => 'f0a000', | ||
| 50 | ); | ||
| 51 | $obj->rrd_title = 'Fork rate'; | ||
| 52 | $obj->rrd_vertical = 'forks/s'; | ||
| 53 | break; | ||
| 54 | |||
| 55 | case 'ps_code': | ||
| 56 | $obj->legend = array( | ||
| 57 | 'value' => 'TRS', | ||
| 58 | ); | ||
| 59 | $obj->colors = array( | ||
| 60 | 'value' => '0000ff', | ||
| 61 | ); | ||
| 62 | $obj->rrd_title = sprintf('Text Resident Set (%s)', $obj->args['pinstance']); | ||
| 63 | $obj->rrd_vertical = 'Bytes'; | ||
| 64 | break; | ||
| 65 | |||
| 66 | case 'ps_count': | ||
| 67 | $obj->data_sources = array('processes', 'threads'); | ||
| 68 | $obj->legend = array( | ||
| 69 | 'processes' => 'Processes', | ||
| 70 | 'threads' => 'Threads', | ||
| 71 | ); | ||
| 72 | $obj->colors = array( | ||
| 73 | 'processes' => '0000ff', | ||
| 74 | 'threads' => 'ff0000', | ||
| 75 | ); | ||
| 76 | $obj->rrd_title = sprintf('Number of Processes/Threads (%s)', $obj->args['pinstance']); | ||
| 77 | $obj->rrd_vertical = 'Amount'; | ||
| 78 | break; | ||
| 79 | |||
| 80 | case 'ps_cputime': | ||
| 81 | $obj->data_sources = array('user', 'syst'); | ||
| 82 | $obj->legend = array( | ||
| 83 | 'user' => 'User', | ||
| 84 | 'syst' => 'System', | ||
| 85 | ); | ||
| 86 | $obj->colors = array( | ||
| 87 | 'user' => '0000ff', | ||
| 88 | 'syst' => 'ff0000', | ||
| 89 | ); | ||
| 90 | $obj->rrd_title = sprintf('CPU time (%s)', $obj->args['pinstance']); | ||
| 91 | $obj->rrd_vertical = 'CPU time [s]'; | ||
| 92 | break; | ||
| 93 | |||
| 94 | case 'ps_disk_octets': | ||
| 95 | $obj->data_sources = array('read', 'write'); | ||
| 96 | $obj->legend = array( | ||
| 97 | 'read' => 'Read', | ||
| 98 | 'write' => 'Write', | ||
| 99 | ); | ||
| 100 | $obj->colors = array( | ||
| 101 | 'read' => '0000ff', | ||
| 102 | 'write' => '00b000', | ||
| 103 | ); | ||
| 104 | $obj->rrd_title = sprintf('Disk Traffic (%s)', $obj->args['pinstance']); | ||
| 105 | $obj->rrd_vertical = 'Bytes per second'; | ||
| 106 | break; | ||
| 107 | |||
| 108 | case 'ps_disk_ops': | ||
| 109 | $obj->data_sources = array('read', 'write'); | ||
| 110 | $obj->legend = array( | ||
| 111 | 'read' => 'Read', | ||
| 112 | 'write' => 'Write', | ||
| 113 | ); | ||
| 114 | $obj->colors = array( | ||
| 115 | 'read' => '0000ff', | ||
| 116 | 'write' => '00b000', | ||
| 117 | ); | ||
| 118 | $obj->rrd_title = sprintf('Disk Operations (%s)', $obj->args['pinstance']); | ||
| 119 | $obj->rrd_vertical = 'Ops per second'; | ||
| 120 | break; | ||
| 121 | |||
| 122 | case 'ps_data': | ||
| 123 | $obj->legend = array( | ||
| 124 | 'value' => 'DRS', | ||
| 125 | ); | ||
| 126 | $obj->colors = array( | ||
| 127 | 'value' => '0000ff', | ||
| 128 | ); | ||
| 129 | $obj->rrd_title = sprintf('Data Resident Set (%s)', $obj->args['pinstance']); | ||
| 130 | $obj->rrd_vertical = 'Bytes'; | ||
| 131 | break; | ||
| 132 | |||
| 133 | case 'ps_pagefaults': | ||
| 134 | $obj->data_sources = array('minflt', 'majflt'); | ||
| 135 | $obj->legend = array( | ||
| 136 | 'minflt' => 'Minor', | ||
| 137 | 'majflt' => 'Major', | ||
| 138 | ); | ||
| 139 | $obj->colors = array( | ||
| 140 | 'minflt' => 'ff0000', | ||
| 141 | 'majflt' => '0000ff', | ||
| 142 | ); | ||
| 143 | $obj->rrd_title = sprintf('PageFaults (%s)', $obj->args['pinstance']); | ||
| 144 | $obj->rrd_vertical = 'Pagefaults'; | ||
| 145 | break; | ||
| 146 | |||
| 147 | case 'ps_rss': | ||
| 148 | $obj->legend = array( | ||
| 149 | 'value' => 'RSS', | ||
| 150 | ); | ||
| 151 | $obj->colors = array( | ||
| 152 | 'value' => '0000ff', | ||
| 153 | ); | ||
| 154 | $obj->rrd_title = sprintf('Resident Segment Size (%s)', $obj->args['pinstance']); | ||
| 155 | $obj->rrd_vertical = 'Bytes'; | ||
| 156 | break; | ||
| 157 | |||
| 158 | case 'ps_stacksize': | ||
| 159 | $obj->legend = array( | ||
| 160 | 'value' => 'Stacksize', | ||
| 161 | ); | ||
| 162 | $obj->colors = array( | ||
| 163 | 'value' => '0000ff', | ||
| 164 | ); | ||
| 165 | $obj->rrd_title = sprintf('Stacksize (%s)', $obj->args['pinstance']); | ||
| 166 | $obj->rrd_vertical = 'Bytes'; | ||
| 167 | break; | ||
| 168 | |||
| 169 | case 'ps_vm': | ||
| 170 | $obj->legend = array( | ||
| 171 | 'value' => 'Memory', | ||
| 172 | ); | ||
| 173 | $obj->colors = array( | ||
| 174 | 'value' => '0000ff', | ||
| 175 | ); | ||
| 176 | $obj->rrd_title = sprintf('Virtual Memory (%s)', $obj->args['pinstance']); | ||
| 177 | $obj->rrd_vertical = 'Bytes'; | ||
| 178 | break; | ||
| 179 | |||
| 180 | } | ||
| 181 | |||
| 182 | |||
| 183 | $obj->rrd_graph(); | ||
diff --git a/plugin/sensors.json b/plugin/sensors.json new file mode 100644 index 0000000..bd860dd --- /dev/null +++ b/plugin/sensors.json | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | { | ||
| 2 | "fanspeed": { | ||
| 3 | "title": "Fanspeed ({{PI}})", | ||
| 4 | "vertical": "RPM", | ||
| 5 | "legend_format": "%5.1lf" | ||
| 6 | }, | ||
| 7 | "temerature": { | ||
| 8 | "title": "Temperature ({{PI}})", | ||
| 9 | "vertical": "Celsius", | ||
| 10 | "legend_format": "%5.1lf%s" | ||
| 11 | }, | ||
| 12 | "voltage": { | ||
| 13 | "title": "Voltage ({{PI}})", | ||
| 14 | "vertical": "Volt", | ||
| 15 | "legend_format": "%5.1lf" | ||
| 16 | } | ||
| 17 | } | ||
diff --git a/plugin/sensors.php b/plugin/sensors.php deleted file mode 100644 index e0c0d9c..0000000 --- a/plugin/sensors.php +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Sensors plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # sensors-XXXX/ | ||
| 10 | # sensors-XXXX/fanspeed-XXXX.rrd | ||
| 11 | # sensors-XXXX/temerature-XXXX.rrd | ||
| 12 | # sensors-XXXX/voltage-XXXX.rrd | ||
| 13 | |||
| 14 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 15 | $obj->legend = array( | ||
| 16 | 'value' => 'Value', | ||
| 17 | ); | ||
| 18 | switch($obj->args['type']) { | ||
| 19 | case 'fanspeed': | ||
| 20 | $obj->rrd_title = sprintf('Fanspeed (%s)', $obj->args['pinstance']); | ||
| 21 | $obj->rrd_vertical = 'RPM'; | ||
| 22 | $obj->rrd_format = '%5.1lf'; | ||
| 23 | break; | ||
| 24 | case 'temperature': | ||
| 25 | $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); | ||
| 26 | $obj->rrd_vertical = 'Celsius'; | ||
| 27 | $obj->rrd_format = '%5.1lf%s'; | ||
| 28 | break; | ||
| 29 | case 'voltage': | ||
| 30 | $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']); | ||
| 31 | $obj->rrd_vertical = 'Volt'; | ||
| 32 | $obj->rrd_format = '%5.1lf'; | ||
| 33 | break; | ||
| 34 | } | ||
| 35 | |||
| 36 | $obj->rrd_graph(); | ||
diff --git a/plugin/snmp.json b/plugin/snmp.json new file mode 100644 index 0000000..9c6cc91 --- /dev/null +++ b/plugin/snmp.json | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | { | ||
| 2 | "if_octets": { | ||
| 3 | "title": "Interface Traffic ({{TI}})", | ||
| 4 | "vertical": "{{ND}} per second", | ||
| 5 | "type": "io", | ||
| 6 | "legend": { | ||
| 7 | "rx": { | ||
| 8 | "name": "Receive", | ||
| 9 | "color": "0000ff" | ||
| 10 | }, | ||
| 11 | "tx": { | ||
| 12 | "name": "Transmit", | ||
| 13 | "color": "00b000" | ||
| 14 | } | ||
| 15 | }, | ||
| 16 | "legend_format": "%5.1lf%s", | ||
| 17 | "datasize": true | ||
| 18 | } | ||
| 19 | } | ||
diff --git a/plugin/snmp.php b/plugin/snmp.php deleted file mode 100644 index 4fbebbb..0000000 --- a/plugin/snmp.php +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd snmp plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | |||
| 7 | |||
| 8 | switch(GET('t')) { | ||
| 9 | case 'if_octets': | ||
| 10 | require_once 'type/GenericIO.class.php'; | ||
| 11 | $obj = new Type_GenericIO($CONFIG, $_GET); | ||
| 12 | $obj->data_sources = array('rx', 'tx'); | ||
| 13 | $obj->legend = array( | ||
| 14 | 'rx' => 'Receive', | ||
| 15 | 'tx' => 'Transmit', | ||
| 16 | ); | ||
| 17 | $obj->colors = array( | ||
| 18 | 'rx' => '0000ff', | ||
| 19 | 'tx' => '00b000', | ||
| 20 | ); | ||
| 21 | $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args['tinstance']); | ||
| 22 | $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize'])); | ||
| 23 | $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; | ||
| 24 | break; | ||
| 25 | default: | ||
| 26 | require_once 'type/Default.class.php'; | ||
| 27 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 28 | $obj->rrd_title = sprintf('SNMP: %s (%s)', $obj->args['type'], $obj->args['tinstance']); | ||
| 29 | break; | ||
| 30 | } | ||
| 31 | |||
| 32 | $obj->rrd_format = '%5.1lf%s'; | ||
| 33 | |||
| 34 | $obj->rrd_graph(); | ||
| 35 | |||
diff --git a/plugin/swap.json b/plugin/swap.json new file mode 100644 index 0000000..8caa510 --- /dev/null +++ b/plugin/swap.json | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | { | ||
| 2 | "swap": { | ||
| 3 | "title": "Swap utilization", | ||
| 4 | "vertical": "Bytes", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend": { | ||
| 7 | "free": { | ||
| 8 | "name": "Free", | ||
| 9 | "color": "00e000" | ||
| 10 | }, | ||
| 11 | "cached": { | ||
| 12 | "name": "Cached", | ||
| 13 | "color": "0000ff" | ||
| 14 | }, | ||
| 15 | "used": { | ||
| 16 | "name": "Used", | ||
| 17 | "color": "ff0000" | ||
| 18 | } | ||
| 19 | }, | ||
| 20 | "legend_format": "%5.1lf%s" | ||
| 21 | }, | ||
| 22 | "swap_io": { | ||
| 23 | "title": "Swapped I/O pages", | ||
| 24 | "vertical": "Pages", | ||
| 25 | "type": "io", | ||
| 26 | "legend": { | ||
| 27 | "out": { | ||
| 28 | "name": "Out", | ||
| 29 | "color": "0000ff" | ||
| 30 | }, | ||
| 31 | "in": { | ||
| 32 | "name": "In", | ||
| 33 | "color": "00b000" | ||
| 34 | } | ||
| 35 | }, | ||
| 36 | "legend_format": "%5.1lf%s" | ||
| 37 | } | ||
| 38 | } | ||
diff --git a/plugin/swap.php b/plugin/swap.php deleted file mode 100644 index 140772c..0000000 --- a/plugin/swap.php +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Swap plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | |||
| 7 | ## LAYOUT | ||
| 8 | # swap/ | ||
| 9 | # swap/swap-cached.rrd | ||
| 10 | # swap/swap-free.rrd | ||
| 11 | # swap/swap-used.rrd | ||
| 12 | |||
| 13 | switch(GET('t')) { | ||
| 14 | case 'swap': | ||
| 15 | require_once 'type/GenericStacked.class.php'; | ||
| 16 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 17 | $obj->order = array('free', 'cached', 'used'); | ||
| 18 | $obj->legend = array( | ||
| 19 | 'free' => 'Free', | ||
| 20 | 'cached' => 'Cached', | ||
| 21 | 'used' => 'Used', | ||
| 22 | ); | ||
| 23 | $obj->colors = array( | ||
| 24 | 'free' => '00e000', | ||
| 25 | 'cached' => '0000ff', | ||
| 26 | 'used' => 'ff0000', | ||
| 27 | ); | ||
| 28 | $obj->rrd_title = 'Swap utilization'; | ||
| 29 | $obj->rrd_vertical = 'Bytes'; | ||
| 30 | break; | ||
| 31 | case 'swap_io': | ||
| 32 | require_once 'type/GenericIO.class.php'; | ||
| 33 | $obj = new Type_GenericIO($CONFIG, $_GET); | ||
| 34 | $obj->order = array('out', 'in'); | ||
| 35 | $obj->legend = array( | ||
| 36 | 'out' => 'Out', | ||
| 37 | 'in' => 'In', | ||
| 38 | ); | ||
| 39 | $obj->colors = array( | ||
| 40 | 'out' => '0000ff', | ||
| 41 | 'in' => '00b000', | ||
| 42 | ); | ||
| 43 | $obj->rrd_title = 'Swapped I/O pages'; | ||
| 44 | $obj->rrd_vertical = 'Pages'; | ||
| 45 | break; | ||
| 46 | } | ||
| 47 | |||
| 48 | $obj->rrd_format = '%5.1lf%s'; | ||
| 49 | |||
| 50 | $obj->rrd_graph(); | ||
diff --git a/plugin/tail.php b/plugin/tail.php deleted file mode 100644 index 5698558..0000000 --- a/plugin/tail.php +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd tail plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | |||
| 9 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 10 | |||
| 11 | $obj->rrd_title = sprintf('tail: %s (%s)', $obj->args['pinstance'], $obj->args['type']); | ||
| 12 | $obj->rrd_format = '%5.1lf%s'; | ||
| 13 | |||
| 14 | # backwards compatibility | ||
| 15 | if ($CONFIG['version'] < 5) { | ||
| 16 | if (strcmp($obj->args['type'], 'gauge') != 0) { | ||
| 17 | $obj->data_sources = array('count'); | ||
| 18 | if (count($obj->legend) == 1) { | ||
| 19 | $obj->legend['count'] = $obj->legend['value']; | ||
| 20 | unset($obj->legend['value']); | ||
| 21 | } | ||
| 22 | if (count($obj->colors) == 1) { | ||
| 23 | $obj->colors['count'] = $obj->colors['value']; | ||
| 24 | unset($obj->colors['value']); | ||
| 25 | } | ||
| 26 | } | ||
| 27 | } | ||
| 28 | |||
| 29 | $obj->rrd_graph(); | ||
diff --git a/plugin/tcpconns.json b/plugin/tcpconns.json new file mode 100644 index 0000000..7b436d9 --- /dev/null +++ b/plugin/tcpconns.json | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | { | ||
| 2 | "tcp_connections": { | ||
| 3 | "title": "TCP Connections ({{TI}})", | ||
| 4 | "vertical": "Connections", | ||
| 5 | "type": "stacked", | ||
| 6 | "legend_format": "%5.1lf" | ||
| 7 | } | ||
| 8 | } | ||
diff --git a/plugin/tcpconns.php b/plugin/tcpconns.php deleted file mode 100644 index 5c629c5..0000000 --- a/plugin/tcpconns.php +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd TCPConns plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # tcpconns-XXXX/ | ||
| 10 | # tcpconns-XXXX/tcp_connections-XXXX.rrd | ||
| 11 | |||
| 12 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 13 | $obj->rrd_title = sprintf('TCP Connections (%s)', $obj->args['pinstance']); | ||
| 14 | $obj->rrd_vertical = '#'; | ||
| 15 | $obj->rrd_format = '%5.1lf'; | ||
| 16 | |||
| 17 | $obj->rrd_graph(); | ||
diff --git a/plugin/thermal.json b/plugin/thermal.json new file mode 100644 index 0000000..6f66a85 --- /dev/null +++ b/plugin/thermal.json | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | { | ||
| 2 | "gauge": { | ||
| 3 | "title": "Temperature ({{PI}})", | ||
| 4 | "vertical": "°C", | ||
| 5 | "legend": { | ||
| 6 | "value": { | ||
| 7 | "name": "Temperature" | ||
| 8 | } | ||
| 9 | }, | ||
| 10 | "legend_format": "%.1lf" | ||
| 11 | } | ||
| 12 | } | ||
diff --git a/plugin/thermal.php b/plugin/thermal.php deleted file mode 100644 index 9f25787..0000000 --- a/plugin/thermal.php +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Thermal plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # thermal-XXXX/ | ||
| 10 | # thermal-XXXX/gauge.rrd | ||
| 11 | |||
| 12 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 13 | $obj->legend = array( | ||
| 14 | 'value' => 'Temperature', | ||
| 15 | ); | ||
| 16 | switch($obj->args['type']) { | ||
| 17 | case 'gauge': | ||
| 18 | $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); | ||
| 19 | $obj->rrd_vertical = '°C'; | ||
| 20 | $obj->rrd_format = '%.1lf'; | ||
| 21 | break; | ||
| 22 | } | ||
| 23 | |||
| 24 | $obj->rrd_graph(); | ||
diff --git a/plugin/uptime.json b/plugin/uptime.json new file mode 100644 index 0000000..c452913 --- /dev/null +++ b/plugin/uptime.json | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | { | ||
| 2 | "uptime": { | ||
| 3 | "title": "Uptime", | ||
| 4 | "vertical": "Days", | ||
| 5 | "type": "uptime", | ||
| 6 | "legend": { | ||
| 7 | "value": { | ||
| 8 | "name": "Current", | ||
| 9 | "color": "00e000" | ||
| 10 | } | ||
| 11 | }, | ||
| 12 | "legend_format": ".1lf" | ||
| 13 | } | ||
| 14 | } | ||
diff --git a/plugin/uptime.php b/plugin/uptime.php deleted file mode 100644 index ca45d76..0000000 --- a/plugin/uptime.php +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Uptime plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Uptime.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # uptime/uptime.rrd | ||
| 10 | |||
| 11 | $obj = new Type_Uptime($CONFIG, $_GET); | ||
| 12 | $obj->data_sources = array('value'); | ||
| 13 | $obj->legend = array( | ||
| 14 | 'value' => 'Current', | ||
| 15 | ); | ||
| 16 | $obj->colors = array( | ||
| 17 | 'value' => '00e000', | ||
| 18 | ); | ||
| 19 | $obj->rrd_title = 'Uptime'; | ||
| 20 | $obj->rrd_vertical = 'Days'; | ||
| 21 | $obj->rrd_format = '%.1lf'; | ||
| 22 | |||
| 23 | $obj->rrd_graph(); | ||
diff --git a/plugin/users.json b/plugin/users.json new file mode 100644 index 0000000..8de437e --- /dev/null +++ b/plugin/users.json | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | { | ||
| 2 | "users": { | ||
| 3 | "title": "Users", | ||
| 4 | "legend": { | ||
| 5 | "value": { | ||
| 6 | "name": "Users", | ||
| 7 | "color": "0000f0" | ||
| 8 | } | ||
| 9 | }, | ||
| 10 | "legend_format": "%.1lf" | ||
| 11 | } | ||
| 12 | } | ||
diff --git a/plugin/users.php b/plugin/users.php deleted file mode 100644 index f49de38..0000000 --- a/plugin/users.php +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Users plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # users/users.rrd | ||
| 10 | |||
| 11 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 12 | $obj->data_sources = array('value'); | ||
| 13 | $obj->legend = array( | ||
| 14 | 'value' => 'Users', | ||
| 15 | ); | ||
| 16 | $obj->colors = array( | ||
| 17 | 'value' => '0000f0', | ||
| 18 | ); | ||
| 19 | $obj->rrd_title = 'Users'; | ||
| 20 | $obj->rrd_vertical = 'Users'; | ||
| 21 | $obj->rrd_format = '%.1lf'; | ||
| 22 | |||
| 23 | # backwards compatibility | ||
| 24 | if ($CONFIG['version'] < 5) { | ||
| 25 | $obj->data_sources = array('users'); | ||
| 26 | |||
| 27 | $obj->legend['users'] = $obj->legend['value']; | ||
| 28 | unset($obj->legend['value']); | ||
| 29 | |||
| 30 | $obj->colors['users'] = $obj->colors['value']; | ||
| 31 | unset($obj->colors['value']); | ||
| 32 | } | ||
| 33 | |||
| 34 | $obj->rrd_graph(); | ||
diff --git a/plugin/varnish.php b/plugin/varnish.php deleted file mode 100644 index f2f597c..0000000 --- a/plugin/varnish.php +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd varnish plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | #varnish-default-backend/connections-failures.rrd | ||
| 10 | #varnish-default-backend/connections-recycled.rrd | ||
| 11 | #varnish-default-backend/connections-success.rrd | ||
| 12 | #varnish-default-backend/connections-unused.rrd | ||
| 13 | #varnish-default-backend/connections-not-attempted.rrd | ||
| 14 | #varnish-default-backend/connections-reuses.rrd | ||
| 15 | #varnish-default-backend/connections-too-many.rrd | ||
| 16 | #varnish-default-backend/connections-was-closed.rrd | ||
| 17 | #varnish-default-cache/cache_result-hitpass.rrd | ||
| 18 | #varnish-default-cache/cache_result-hit.rrd | ||
| 19 | #varnish-default-cache/cache_result-miss.rrd | ||
| 20 | #varnish-default-connections/connections-accepted.rrd | ||
| 21 | #varnish-default-connections/connections-dropped.rrd | ||
| 22 | #varnish-default-connections/connections-received.rrd | ||
| 23 | |||
| 24 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 25 | $obj->rrd_format = '%5.1lf%s'; | ||
| 26 | $obj->rrd_title = sprintf('%s (%s)', ucfirst($obj->args['pinstance']), $obj->args['category']); | ||
| 27 | $obj->rrd_vertical = 'hits'; | ||
| 28 | |||
| 29 | $obj->rrd_graph(); | ||
diff --git a/plugin/vmem.json b/plugin/vmem.json new file mode 100644 index 0000000..14d214e --- /dev/null +++ b/plugin/vmem.json | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | { | ||
| 2 | "vmpage_faults": { | ||
| 3 | "title": "Page faults", | ||
| 4 | "type": "stacked", | ||
| 5 | "legend": { | ||
| 6 | "minflt": { | ||
| 7 | "name": "Minor", | ||
| 8 | "color": "0000f0" | ||
| 9 | }, | ||
| 10 | "majflt": { | ||
| 11 | "name": "Major", | ||
| 12 | "color": "f00000" | ||
| 13 | } | ||
| 14 | }, | ||
| 15 | "legend_format": "%5.1lf%s" | ||
| 16 | }, | ||
| 17 | "vmpage_io": { | ||
| 18 | "title": "Page IO ({{TI}})", | ||
| 19 | "type": "stacked", | ||
| 20 | "legend_format": "%5.1lf%s" | ||
| 21 | }, | ||
| 22 | "vmpage_number": { | ||
| 23 | "title": "Pages", | ||
| 24 | "type": "stacked", | ||
| 25 | "legend_format": "%5.1lf%s" | ||
| 26 | } | ||
| 27 | } | ||
diff --git a/plugin/vmem.php b/plugin/vmem.php deleted file mode 100644 index f66272b..0000000 --- a/plugin/vmem.php +++ /dev/null | |||
| @@ -1,58 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd VMem plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # vmem/ | ||
| 10 | # vmem/vmpage_faults.rrd | ||
| 11 | # vmem/vmpage_io-memory.rrd | ||
| 12 | # vmem/vmpage_io-swapy.rrd | ||
| 13 | # vmem/vmpage_number-<type>.rrd | ||
| 14 | |||
| 15 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 16 | $obj->rrd_format = '%5.1lf%s'; | ||
| 17 | |||
| 18 | switch($obj->args['type']) { | ||
| 19 | case 'vmpage_faults': | ||
| 20 | $obj->data_sources = array('minflt', 'majflt'); | ||
| 21 | $obj->colors = array('minflt' => '0000f0', | ||
| 22 | 'majflt' => 'f00000'); | ||
| 23 | $obj->legend = array('minflt' => 'Minor', | ||
| 24 | 'majflt' => 'Major'); | ||
| 25 | $obj->rrd_title = 'Page faults'; | ||
| 26 | $obj->rrd_vertical = ''; | ||
| 27 | break; | ||
| 28 | case 'vmpage_io': | ||
| 29 | $obj->data_sources = array('in', 'out'); | ||
| 30 | $obj->legend = array('memory-in' => 'Memory (in)', | ||
| 31 | 'memory-out' => 'Memory (out)', | ||
| 32 | 'swap-in' => 'Swap (in)', | ||
| 33 | 'swap-out' => 'Swap (out)'); | ||
| 34 | $obj->colors = array('memory-in' => 'ff0000', | ||
| 35 | 'memory-out' => '0000ff', | ||
| 36 | 'swap-in' => 'ff00ff', | ||
| 37 | 'swap-out' => 'ffff00'); | ||
| 38 | $obj->rrd_title = 'Page IO'; | ||
| 39 | $obj->rrd_vertical = ''; | ||
| 40 | break; | ||
| 41 | case 'vmpage_number': | ||
| 42 | $obj->data_sources = array('value'); | ||
| 43 | $obj->order = array('active_anon', 'active_file', | ||
| 44 | 'anon_pages', 'bounce', | ||
| 45 | 'dirty', 'file_pages', | ||
| 46 | 'free_pages', 'inactive_anon', | ||
| 47 | 'inactive_file', 'mapped', | ||
| 48 | 'mlock', 'page_table_pages', | ||
| 49 | 'slab_reclaimable', 'slab_unreclaimable', | ||
| 50 | 'unevictable', 'unstable', | ||
| 51 | #'vmscan_write', | ||
| 52 | 'writeback', 'writeback_temp'); | ||
| 53 | $obj->rrd_title = 'Pages'; | ||
| 54 | $obj->rrd_vertical = ''; | ||
| 55 | break; | ||
| 56 | } | ||
| 57 | |||
| 58 | $obj->rrd_graph(); | ||
diff --git a/plugin/vserver.json b/plugin/vserver.json new file mode 100644 index 0000000..7366693 --- /dev/null +++ b/plugin/vserver.json | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | { | ||
| 2 | "load": { | ||
| 3 | "title": "System load", | ||
| 4 | "vertical": "System load", | ||
| 5 | "type": "default", | ||
| 6 | "legend": { | ||
| 7 | "shortterm": { | ||
| 8 | "name": " 1 min", | ||
| 9 | "color": "00ff00" | ||
| 10 | }, | ||
| 11 | "midterm": { | ||
| 12 | "name": " 5 min", | ||
| 13 | "color": "0000ff" | ||
| 14 | }, | ||
| 15 | "longterm": { | ||
| 16 | "name": "15 min", | ||
| 17 | "color": "ff0000" | ||
| 18 | } | ||
| 19 | }, | ||
| 20 | "legend_format": "%.2lf" | ||
| 21 | }, | ||
| 22 | "vs_memory": { | ||
| 23 | "title": "Memory utilization ({{PI}})", | ||
| 24 | "vertical": "Bytes", | ||
| 25 | "type": "stacked", | ||
| 26 | "legend": { | ||
| 27 | "vm": { | ||
| 28 | "name": "Virtual memory pages", | ||
| 29 | "color": "0000ff" | ||
| 30 | }, | ||
| 31 | "vml": { | ||
| 32 | "name": "Pages locked into memory", | ||
| 33 | "color": "0000ff" | ||
| 34 | }, | ||
| 35 | "rss": { | ||
| 36 | "name": "Resident set size", | ||
| 37 | "color": "ffb000" | ||
| 38 | }, | ||
| 39 | "anon": { | ||
| 40 | "name": "Anonymous memory pages", | ||
| 41 | "color": "ff00ff" | ||
| 42 | } | ||
| 43 | }, | ||
| 44 | "legend_format": "%5.1lf%s" | ||
| 45 | }, | ||
| 46 | "vs_threads": { | ||
| 47 | "title": "Threads ({{PI}})", | ||
| 48 | "type": "stacked", | ||
| 49 | "legend": { | ||
| 50 | "running": { | ||
| 51 | "name": "Running", | ||
| 52 | "color": "0000ff" | ||
| 53 | }, | ||
| 54 | "uninterruptable": { | ||
| 55 | "name": "Uninterruptible", | ||
| 56 | "color": "ff00ff" | ||
| 57 | }, | ||
| 58 | "onhold": { | ||
| 59 | "name": "On Hold", | ||
| 60 | "color": "00e000" | ||
| 61 | }, | ||
| 62 | "total": { | ||
| 63 | "name": "Total", | ||
| 64 | "color": "Total" | ||
| 65 | } | ||
| 66 | }, | ||
| 67 | "legend_format": "%5.1lf%s" | ||
| 68 | }, | ||
| 69 | "if_octets": { | ||
| 70 | "title": "Interface Traffic ({{PI}})", | ||
| 71 | "vertical": "{{ND}} per second", | ||
| 72 | "legend_format": "%5.1lf%s", | ||
| 73 | "datasize": true | ||
| 74 | }, | ||
| 75 | "vs_processes": { | ||
| 76 | "title": "Processes ({{PI}})", | ||
| 77 | "legend": { | ||
| 78 | "value": { | ||
| 79 | "name": "Processes" | ||
| 80 | } | ||
| 81 | }, | ||
| 82 | "legend_format": "%5.1lf%s" | ||
| 83 | } | ||
| 84 | } | ||
diff --git a/plugin/vserver.php b/plugin/vserver.php deleted file mode 100644 index 80fad3e..0000000 --- a/plugin/vserver.php +++ /dev/null | |||
| @@ -1,122 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd VServer plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericIO.class.php'; | ||
| 7 | require_once 'type/GenericStacked.class.php'; | ||
| 8 | |||
| 9 | # LAYOUT | ||
| 10 | # vserver-XXXX | ||
| 11 | # vserver-XXXX/if_octets-inet6.rrd | ||
| 12 | # vserver-XXXX/if_octets-inet.rrd | ||
| 13 | # vserver-XXXX/if_octets-other.rrd | ||
| 14 | # vserver-XXXX/if_octets-unix.rrd | ||
| 15 | # vserver-XXXX/if_octets-unspec.rrd | ||
| 16 | # vserver-XXXX/load.rrd | ||
| 17 | # vserver-XXXX/vs_memory-anon.rrd | ||
| 18 | # vserver-XXXX/vs_memory-rss.rrd | ||
| 19 | # vserver-XXXX/vs_memory-vml.rrd | ||
| 20 | # vserver-XXXX/vs_memory-vm.rrd | ||
| 21 | # vserver-XXXX/vs_processes.rrd | ||
| 22 | # vserver-XXXX/vs_threads-onhold.rrd | ||
| 23 | # vserver-XXXX/vs_threads-running.rrd | ||
| 24 | # vserver-XXXX/vs_threads-total.rrd | ||
| 25 | # vserver-XXXX/vs_threads-uninterruptable.rrd | ||
| 26 | |||
| 27 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 28 | |||
| 29 | switch($obj->args['type']) { | ||
| 30 | case 'load': | ||
| 31 | require_once "plugin/load.php"; | ||
| 32 | break; | ||
| 33 | case 'vs_memory': | ||
| 34 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 35 | $obj->order = array('vm', 'vml', 'rss', 'anon'); | ||
| 36 | # http://oldwiki.linux-vserver.org/Memory+Allocation | ||
| 37 | $obj->legend = array( | ||
| 38 | 'vm' => "Virtual memory pages", | ||
| 39 | 'vml' => "Pages locked into memory", | ||
| 40 | 'rss' => "Resident set size", | ||
| 41 | 'anon' => "Anonymous memory pages", | ||
| 42 | ); | ||
| 43 | $obj->colors = array( | ||
| 44 | 'vm' => '00e000', | ||
| 45 | 'vml' => '0000ff', | ||
| 46 | 'rss' => 'ffb000', | ||
| 47 | 'anon' => 'ff00ff', | ||
| 48 | ); | ||
| 49 | |||
| 50 | $obj->rrd_title = sprintf('Memory utilization on Vserver %s', $obj->args['pinstance']); | ||
| 51 | $obj->rrd_vertical = 'Bytes'; | ||
| 52 | $obj->rrd_format = '%5.1lf%s'; | ||
| 53 | |||
| 54 | $obj->rrd_graph(); | ||
| 55 | break; | ||
| 56 | case 'vs_threads': | ||
| 57 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 58 | $obj->order = array('running', 'uninterruptable', 'onhold', 'total'); | ||
| 59 | # http://linux-vserver.org/ProcFS | ||
| 60 | $obj->legend = array( | ||
| 61 | 'onhold' => "Number of threads on hold", | ||
| 62 | 'running' => "Number of running threads", | ||
| 63 | 'total' => "Total number of threads", | ||
| 64 | 'uninterruptable' => "Number of uninterruptible threads", | ||
| 65 | ); | ||
| 66 | $obj->colors = array( | ||
| 67 | 'onhold' => '00e000', | ||
| 68 | 'running' => '0000ff', | ||
| 69 | 'total' => 'ffb000', | ||
| 70 | 'uninterruptable' => 'ff00ff', | ||
| 71 | ); | ||
| 72 | |||
| 73 | $obj->rrd_title = sprintf('Threads on Vserver %s', $obj->args['pinstance']); | ||
| 74 | $obj->rrd_vertical = 'Numbers'; | ||
| 75 | $obj->rrd_format = '%5.1lf%s'; | ||
| 76 | |||
| 77 | $obj->rrd_graph(); | ||
| 78 | break; | ||
| 79 | case 'if_octets': | ||
| 80 | $obj->data_sources = array('rx', 'tx'); | ||
| 81 | $obj->legend = array( | ||
| 82 | 'inet-rx' => 'IPv4 Receive', | ||
| 83 | 'inet-tx' => 'IPv4 Transmit', | ||
| 84 | 'inet6-rx' => 'IPv6 Receive', | ||
| 85 | 'inet6-tx' => 'IPv6 Transmit', | ||
| 86 | ); | ||
| 87 | $obj->colors = array( | ||
| 88 | 'inet-rx' => '0000ff', | ||
| 89 | 'inet-tx' => '00b000', | ||
| 90 | 'inet6-rx' => 'e0e0e0', | ||
| 91 | 'inet6-tx' => 'ffb000', | ||
| 92 | 'other-rx' => 'ff00ff', | ||
| 93 | 'other-tx' => 'a000a0', | ||
| 94 | 'unix-rx' => '00e000', | ||
| 95 | 'unix-tx' => '0080ff', | ||
| 96 | 'unspec-rx' => 'ff0000', | ||
| 97 | 'unspec-tx' => '000080', | ||
| 98 | ); | ||
| 99 | $obj->rrd_title = sprintf('Traffic on Vserver %s', $obj->args['pinstance']); | ||
| 100 | $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize'])); | ||
| 101 | $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; | ||
| 102 | $obj->rrd_format = '%5.1lf%s'; | ||
| 103 | |||
| 104 | $obj->rrd_graph(); | ||
| 105 | break; | ||
| 106 | case 'vs_processes': | ||
| 107 | $obj->data_sources = array('value'); | ||
| 108 | $obj->legend = array( | ||
| 109 | 'value' => 'Processes', | ||
| 110 | ); | ||
| 111 | $obj->rrd_title = sprintf('Processes on Vserver %s', $obj->args['pinstance']); | ||
| 112 | $obj->rrd_vertical = 'Processes'; | ||
| 113 | |||
| 114 | $obj->rrd_format = '%5.1lf%s'; | ||
| 115 | |||
| 116 | $obj->rrd_graph(); | ||
| 117 | break; | ||
| 118 | |||
| 119 | default: | ||
| 120 | die('Not implemented yet.'); | ||
| 121 | break; | ||
| 122 | } | ||
diff --git a/plugin/wireless.json b/plugin/wireless.json new file mode 100644 index 0000000..1c53489 --- /dev/null +++ b/plugin/wireless.json | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | { | ||
| 2 | "signal_noise": { | ||
| 3 | "title": "Noise level ({{PI}})", | ||
| 4 | "vertical": "dBm", | ||
| 5 | "legend": { | ||
| 6 | "value": { | ||
| 7 | "name": "Noise level", | ||
| 8 | "color": "0000f0" | ||
| 9 | } | ||
| 10 | }, | ||
| 11 | "legend_format": "%6.1lf" | ||
| 12 | }, | ||
| 13 | "signal_power": { | ||
| 14 | "title": "Signal level ({{PI}})", | ||
| 15 | "vertical": "dBm", | ||
| 16 | "legend": { | ||
| 17 | "value": { | ||
| 18 | "name": "Signal level", | ||
| 19 | "color": "0000f0" | ||
| 20 | } | ||
| 21 | }, | ||
| 22 | "legend_format": "%6.1lf" | ||
| 23 | }, | ||
| 24 | "signal_quality": { | ||
| 25 | "title": "Link Quality ({{PI}})", | ||
| 26 | "vertical": "quality", | ||
| 27 | "legend": { | ||
| 28 | "value": { | ||
| 29 | "name": "Link quality", | ||
| 30 | "color": "0000f0" | ||
| 31 | } | ||
| 32 | }, | ||
| 33 | "legend_format": "%6.1lf" | ||
| 34 | } | ||
| 35 | } | ||
diff --git a/plugin/wireless.php b/plugin/wireless.php deleted file mode 100644 index cb3a8a9..0000000 --- a/plugin/wireless.php +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Wireless Plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | $obj = new Type_GenericStacked($CONFIG, $_GET); | ||
| 9 | $obj->data_sources = array('value'); | ||
| 10 | $obj->legend = array('value' => 'Value'); | ||
| 11 | $obj->colors = array('value' => '0000f0'); | ||
| 12 | $obj->rrd_format = '%6.1lf'; | ||
| 13 | |||
| 14 | switch($obj->args['type']) { | ||
| 15 | case 'signal_noise': | ||
| 16 | $obj->rrd_title = sprintf('Noise level (%s)', $obj->args['pinstance']); | ||
| 17 | $obj->rrd_vertical = 'dBm'; | ||
| 18 | break; | ||
| 19 | case 'signal_power': | ||
| 20 | $obj->rrd_title = sprintf('Signal level (%s)', $obj->args['pinstance']); | ||
| 21 | $obj->rrd_vertical = 'dBm'; | ||
| 22 | break; | ||
| 23 | case 'signal_quality': | ||
| 24 | $obj->rrd_title = sprintf('Link Quality (%s)', $obj->args['pinstance']); | ||
| 25 | $obj->rrd_vertical = 'quality'; | ||
| 26 | break; | ||
| 27 | } | ||
| 28 | |||
| 29 | $obj->rrd_graph(); | ||
diff --git a/plugin/zfs_arc.php b/plugin/zfs_arc.php deleted file mode 100644 index 5c25c3a..0000000 --- a/plugin/zfs_arc.php +++ /dev/null | |||
| @@ -1,97 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | # Collectd zfs_arc plugin | ||
| 3 | |||
| 4 | require_once 'conf/common.inc.php'; | ||
| 5 | require_once 'type/Default.class.php'; | ||
| 6 | |||
| 7 | ## LAYOUT | ||
| 8 | # zfs_arc/ | ||
| 9 | # zfs_arc/arc_counts-hits.rrd | ||
| 10 | # zfs_arc/arc_counts-misses.rrd | ||
| 11 | # zfs_arc/arc_l2_bytes.rrd | ||
| 12 | # zfs_arc/arc_l2_size.rrd | ||
| 13 | # zfs_arc/arc_ratio-L1.rrd | ||
| 14 | # zfs_arc/arc_ratio-L2.rrd | ||
| 15 | # zfs_arc/arc_size.rrd | ||
| 16 | |||
| 17 | $obj = new Type_Default($CONFIG, $_GET); | ||
| 18 | $obj->rrd_format = '%5.1lf%s'; | ||
| 19 | |||
| 20 | switch($obj->args['type']) { | ||
| 21 | case 'arc_counts': | ||
| 22 | $obj->data_sources = array( | ||
| 23 | 'demand_data', | ||
| 24 | 'demand_metadata', | ||
| 25 | 'prefetch_data', | ||
| 26 | 'prefetch_metadata', | ||
| 27 | ); | ||
| 28 | $obj->colors = array( | ||
| 29 | 'hits-demand_data' => 'ff0000', | ||
| 30 | 'misses-demand_data' => '880000', | ||
| 31 | 'hits-demand_metadata' => '00ff00', | ||
| 32 | 'misses-demand_metadata' => '00aa00', | ||
| 33 | 'hits-prefetch_data' => '0000ff', | ||
| 34 | 'misses-prefetch_data' => '00f0f0', | ||
| 35 | 'hits-prefetch_metadata' => 'ff00ff', | ||
| 36 | 'misses-prefetch_metadata' => '888800', | ||
| 37 | ); | ||
| 38 | $obj->legend = array( | ||
| 39 | 'hits-demand_data' => 'data hits', | ||
| 40 | 'misses-demand_data' => 'metadata misses', | ||
| 41 | 'hits-demand_metadata' => 'metadata hits', | ||
| 42 | 'misses-demand_metadata' => 'metadata misses', | ||
| 43 | 'hits-prefetch_data' => 'prefetch data hits', | ||
| 44 | 'misses-prefetch_data' => 'prefetch data misses', | ||
| 45 | 'hits-prefetch_metadata' => 'prefetch metadata hits', | ||
| 46 | 'misses-prefetch_metadata' => 'prefetch metadata misses', | ||
| 47 | ); | ||
| 48 | $obj->rrd_title = 'arc counts'; | ||
| 49 | $obj->rrd_vertical = 'count'; | ||
| 50 | break; | ||
| 51 | case 'arc_size': | ||
| 52 | $obj->data_sources = array('current','target','minlimit','maxlimit'); | ||
| 53 | $obj->order = array( | ||
| 54 | 'current', | ||
| 55 | 'target', | ||
| 56 | 'minlimit', | ||
| 57 | 'maxlimit', | ||
| 58 | ); | ||
| 59 | $obj->rrd_title = 'Arc size'; | ||
| 60 | $obj->rrd_vertical = 'bytes'; | ||
| 61 | break; | ||
| 62 | case 'arc_l2_bytes': | ||
| 63 | $obj->data_sources = array( | ||
| 64 | 'write', | ||
| 65 | 'read', | ||
| 66 | ); | ||
| 67 | $obj->legend = array( | ||
| 68 | 'write' => 'Write', | ||
| 69 | 'read' => 'Read', | ||
| 70 | ); | ||
| 71 | $obj->colors = array( | ||
| 72 | 'write' => 'ff0000', | ||
| 73 | 'read' => '0000ff', | ||
| 74 | ); | ||
| 75 | $obj->rrd_title = 'Arc L2 bytes'; | ||
| 76 | $obj->rrd_vertical = 'bytes'; | ||
| 77 | break; | ||
| 78 | case 'arc_l2_size': | ||
| 79 | $obj->data_sources = array( | ||
| 80 | 'value', | ||
| 81 | ); | ||
| 82 | $obj->legend = array( | ||
| 83 | 'value' => 'Bytes', | ||
| 84 | ); | ||
| 85 | $obj->colors = array( | ||
| 86 | 'value' => '0000ff', | ||
| 87 | ); | ||
| 88 | $obj->rrd_title = 'Arc L2 size'; | ||
| 89 | $obj->rrd_vertical = 'bytes'; | ||
| 90 | break; | ||
| 91 | case 'arc_ratio': | ||
| 92 | $obj->data_sources = array('value'); | ||
| 93 | $obj->rrd_title = 'Arc ratio'; | ||
| 94 | $obj->rrd_vertical = 'ratio'; | ||
| 95 | break; | ||
| 96 | } | ||
| 97 | $obj->rrd_graph(); | ||
