From 1c888304d33a8c1405b8716356ae300fad39521c Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sat, 3 May 2014 11:15:53 +0200 Subject: type/Default: don't depend on external function GET --- plugin/aggregation.php | 2 +- plugin/apache.php | 4 ++-- plugin/apcups.php | 2 +- plugin/battery.php | 2 +- plugin/bind.php | 2 +- plugin/conntrack.php | 2 +- plugin/contextswitch.php | 2 +- plugin/cpu.php | 2 +- plugin/cpufreq.php | 2 +- plugin/dbi.php | 2 +- plugin/df.php | 2 +- plugin/disk.php | 2 +- plugin/dns.php | 2 +- plugin/entropy.php | 2 +- plugin/filecount.php | 2 +- plugin/hddtemp.php | 2 +- plugin/interface.php | 2 +- plugin/ip6tables.php | 2 +- plugin/ipmi.php | 2 +- plugin/iptables.php | 2 +- plugin/irq.php | 2 +- plugin/libvirt.php | 6 +++--- plugin/load.php | 2 +- plugin/md.php | 2 +- plugin/memcached.php | 18 +++++++++--------- plugin/memory.php | 2 +- plugin/mysql.php | 2 +- plugin/netlink.php | 2 +- plugin/nfs.php | 2 +- plugin/nginx.php | 2 +- plugin/ntpd.php | 2 +- plugin/nut.php | 2 +- plugin/openvpn.php | 4 ++-- plugin/ping.php | 2 +- plugin/postgresql.php | 2 +- plugin/powerdns.php | 2 +- plugin/processes.php | 2 +- plugin/sensors.php | 2 +- plugin/snmp.php | 4 ++-- plugin/swap.php | 4 ++-- plugin/tail.php | 2 +- plugin/tcpconns.php | 2 +- plugin/thermal.php | 2 +- plugin/uptime.php | 2 +- plugin/users.php | 2 +- plugin/varnish.php | 2 +- plugin/vmem.php | 2 +- plugin/vserver.php | 6 +++--- plugin/wireless.php | 2 +- plugin/zfs_arc.php | 2 +- 50 files changed, 66 insertions(+), 66 deletions(-) (limited to 'plugin') diff --git a/plugin/aggregation.php b/plugin/aggregation.php index 3e8b598..c4353ce 100644 --- a/plugin/aggregation.php +++ b/plugin/aggregation.php @@ -13,7 +13,7 @@ $pi = explode("-", GET('pi')); switch($pi[0]) { case 'cpu': require_once 'type/GenericStacked.class.php'; - $obj = new Type_GenericStacked($CONFIG); + $obj = new Type_GenericStacked($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->order = array('idle', 'nice', 'user', 'wait', 'system', 'softirq', 'interrupt', 'steal'); $obj->ds_names = array( diff --git a/plugin/apache.php b/plugin/apache.php index 7e4919a..226385e 100644 --- a/plugin/apache.php +++ b/plugin/apache.php @@ -13,7 +13,7 @@ require_once 'inc/collectd.inc.php'; # apache[-X]/apache_requests-X.rrd # apache[-X]/apache_scoreboard-X.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); switch ($obj->args['type']) { case 'apache_bytes': @@ -67,7 +67,7 @@ switch ($obj->args['type']) { break; case 'apache_scoreboard': require_once 'type/GenericStacked.class.php'; - $obj = new Type_GenericStacked($CONFIG); + $obj = new Type_GenericStacked($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->order = array( 'open', diff --git a/plugin/apcups.php b/plugin/apcups.php index 5566977..24d1918 100644 --- a/plugin/apcups.php +++ b/plugin/apcups.php @@ -17,7 +17,7 @@ require_once 'inc/collectd.inc.php'; # apcups/voltage-input.rrd # apcups/voltage-output.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); switch($obj->args['type']) { case 'charge': diff --git a/plugin/battery.php b/plugin/battery.php index b03aba7..740d5cb 100644 --- a/plugin/battery.php +++ b/plugin/battery.php @@ -12,7 +12,7 @@ require_once 'inc/collectd.inc.php'; # battery-X/current.rrd # battery-X/voltage.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->colors = array( 'value' => '0000f0', ); diff --git a/plugin/bind.php b/plugin/bind.php index e6d562c..702fec5 100644 --- a/plugin/bind.php +++ b/plugin/bind.php @@ -7,7 +7,7 @@ require_once 'type/GenericStacked.class.php'; require_once 'inc/collectd.inc.php'; -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->rrd_title = sprintf('%s/%s', $obj->args['pinstance'], $obj->args['type']); $obj->rrd_format = '%5.1lf%s'; diff --git a/plugin/conntrack.php b/plugin/conntrack.php index 0415f2a..27a3656 100644 --- a/plugin/conntrack.php +++ b/plugin/conntrack.php @@ -9,7 +9,7 @@ require_once 'inc/collectd.inc.php'; ## LAYOUT # conntrack/conntrack.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->ds_names = array( 'value' => 'Conntrack entries', diff --git a/plugin/contextswitch.php b/plugin/contextswitch.php index 45b5f30..e71c417 100644 --- a/plugin/contextswitch.php +++ b/plugin/contextswitch.php @@ -9,7 +9,7 @@ require_once 'inc/collectd.inc.php'; ## LAYOUT # contextswitch/contextswitch.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->ds_names = array( 'value' => 'Context switches', diff --git a/plugin/cpu.php b/plugin/cpu.php index a886f97..a3e968a 100644 --- a/plugin/cpu.php +++ b/plugin/cpu.php @@ -17,7 +17,7 @@ require_once 'inc/collectd.inc.php'; # cpu-X/cpu-user.rrd # cpu-X/cpu-wait.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->order = array('idle', 'nice', 'user', 'wait', 'system', 'softirq', 'interrupt', 'steal'); $obj->ds_names = array( diff --git a/plugin/cpufreq.php b/plugin/cpufreq.php index 99f51c6..fbdc6ff 100644 --- a/plugin/cpufreq.php +++ b/plugin/cpufreq.php @@ -9,7 +9,7 @@ require_once 'inc/collectd.inc.php'; ## LAYOUT # cpufreq/cpufreq-X.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->rrd_title = 'CPU frequency scaling'; $obj->rrd_vertical = 'Hz'; diff --git a/plugin/dbi.php b/plugin/dbi.php index cd650f2..31aacc9 100644 --- a/plugin/dbi.php +++ b/plugin/dbi.php @@ -8,7 +8,7 @@ require_once 'inc/collectd.inc.php'; -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->rrd_title = sprintf('%s', $obj->args['pinstance'], $obj->args['type']); diff --git a/plugin/df.php b/plugin/df.php index d4ccc0e..464e26c 100644 --- a/plugin/df.php +++ b/plugin/df.php @@ -12,7 +12,7 @@ require_once 'inc/collectd.inc.php'; # df-X/df_complex-reserved.rrd # df-X/df_complex-used.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->order = array('reserved', 'free', 'used'); $obj->ds_names = array( diff --git a/plugin/disk.php b/plugin/disk.php index 763ae10..33bb147 100644 --- a/plugin/disk.php +++ b/plugin/disk.php @@ -13,7 +13,7 @@ require_once 'inc/collectd.inc.php'; # disk-XXXX/disk_ops.rrd # disk-XXXX/disk_time.rrd -$obj = new Type_GenericIO($CONFIG); +$obj = new Type_GenericIO($CONFIG, $_GET); $obj->data_sources = array('read', 'write'); $obj->ds_names = array( 'read' => 'Read', diff --git a/plugin/dns.php b/plugin/dns.php index d9bc759..f770988 100644 --- a/plugin/dns.php +++ b/plugin/dns.php @@ -12,7 +12,7 @@ require_once 'inc/collectd.inc.php'; # dns/dns_opcode-X.rrd # dns/dns_qtype-X.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) { diff --git a/plugin/entropy.php b/plugin/entropy.php index 1c7f763..137e5a2 100644 --- a/plugin/entropy.php +++ b/plugin/entropy.php @@ -9,7 +9,7 @@ require_once 'inc/collectd.inc.php'; ## LAYOUT # entropy/entropy.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->ds_names = array( 'value' => 'Entropy bits', diff --git a/plugin/filecount.php b/plugin/filecount.php index daa9fd9..812be9c 100644 --- a/plugin/filecount.php +++ b/plugin/filecount.php @@ -11,7 +11,7 @@ require_once 'inc/collectd.inc.php'; # filecount-X/bytes.rrd # filecount-X/files.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->rrd_format = '%5.1lf%s'; $obj->data_sources = array('value'); diff --git a/plugin/hddtemp.php b/plugin/hddtemp.php index 2df7f35..5526154 100644 --- a/plugin/hddtemp.php +++ b/plugin/hddtemp.php @@ -9,7 +9,7 @@ require_once 'inc/collectd.inc.php'; ## LAYOUT # hddtemp/temperature-.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->ds_names = array('temperature' => 'Temperature'); $obj->rrd_title = 'HDD Temperature'; $obj->rrd_vertical = '°C'; diff --git a/plugin/interface.php b/plugin/interface.php index c8828b2..c51d732 100644 --- a/plugin/interface.php +++ b/plugin/interface.php @@ -17,7 +17,7 @@ require_once 'inc/collectd.inc.php'; # interface-XXXX/if_octets.rrd # interface-XXXX/if_packets.rrd -$obj = new Type_GenericIO($CONFIG); +$obj = new Type_GenericIO($CONFIG, $_GET); $obj->data_sources = array('rx', 'tx'); $obj->ds_names = array( 'rx' => 'Receive', diff --git a/plugin/ip6tables.php b/plugin/ip6tables.php index 6d0304b..cd95bc8 100644 --- a/plugin/ip6tables.php +++ b/plugin/ip6tables.php @@ -10,7 +10,7 @@ require_once 'inc/collectd.inc.php'; # ip6tables/ipt_bytes-XXX.rrd # ip6tables/ipt_packets-XXX.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->data_sources = array('value'); switch($_GET['t']) { diff --git a/plugin/ipmi.php b/plugin/ipmi.php index e06e4ad..9f975b5 100644 --- a/plugin/ipmi.php +++ b/plugin/ipmi.php @@ -19,7 +19,7 @@ require_once 'inc/collectd.inc.php'; # voltage-+12 V system_board (7.1).rrd # voltage-VBAT system_board (7.1).rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->ds_names = array( 'value' => 'Value', ); diff --git a/plugin/iptables.php b/plugin/iptables.php index 7b12f51..de060be 100644 --- a/plugin/iptables.php +++ b/plugin/iptables.php @@ -10,7 +10,7 @@ require_once 'inc/collectd.inc.php'; # iptables/ipt_bytes-XXX.rrd # iptables/ipt_packets-XXX.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->data_sources = array('value'); switch($_GET['t']) { diff --git a/plugin/irq.php b/plugin/irq.php index e4e32f6..52d49e8 100644 --- a/plugin/irq.php +++ b/plugin/irq.php @@ -10,7 +10,7 @@ require_once 'inc/collectd.inc.php'; # irq/ # irq/irq-XX.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->rrd_title = 'Interrupts'; $obj->rrd_vertical = 'IRQs/s'; diff --git a/plugin/libvirt.php b/plugin/libvirt.php index 1cc05c2..08d0a6d 100644 --- a/plugin/libvirt.php +++ b/plugin/libvirt.php @@ -16,7 +16,7 @@ require_once 'inc/collectd.inc.php'; # libvirt/virt_cpu_total.rrd require_once 'type/GenericIO.class.php'; -$obj = new Type_GenericIO($CONFIG); +$obj = new Type_GenericIO($CONFIG, $_GET); switch($obj->args['type']) { case 'disk_octets': @@ -102,7 +102,7 @@ switch($obj->args['type']) { break; case 'virt_cpu_total': require_once 'type/Default.class.php'; - $obj = new Type_Default($CONFIG); + $obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->ds_names = array( @@ -116,7 +116,7 @@ switch($obj->args['type']) { break; case 'virt_vcpu': require_once 'type/Default.class.php'; - $obj = new Type_Default($CONFIG); + $obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->ds_names = array( diff --git a/plugin/load.php b/plugin/load.php index fe2305c..0429735 100644 --- a/plugin/load.php +++ b/plugin/load.php @@ -9,7 +9,7 @@ require_once 'inc/collectd.inc.php'; ## LAYOUT # load/load.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('shortterm', 'midterm', 'longterm'); $obj->ds_names = array( 'shortterm' => ' 1 min', diff --git a/plugin/md.php b/plugin/md.php index 56df8a3..c435a23 100644 --- a/plugin/md.php +++ b/plugin/md.php @@ -10,7 +10,7 @@ require_once 'inc/collectd.inc.php'; # md-XXXX/ # md-XXXX/md_disks-XXXX.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->ds_names = array( 'value' => 'Value', ); diff --git a/plugin/memcached.php b/plugin/memcached.php index ee80caf..3424769 100644 --- a/plugin/memcached.php +++ b/plugin/memcached.php @@ -25,7 +25,7 @@ switch(GET('t')) { # df-cache.rrd case 'df': require_once 'type/Default.class.php'; - $obj = new Type_Default($CONFIG); + $obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('used', 'free'); $obj->order = array('used', 'free'); $obj->ds_names = array( @@ -43,7 +43,7 @@ switch(GET('t')) { # memcached_command-(flush|get|set).rrd case 'memcached_command': require_once 'type/GenericStacked.class.php'; - $obj = new Type_GenericStacked($CONFIG); + $obj = new Type_GenericStacked($CONFIG, $_GET); $obj->order = array('flush', 'get', 'set'); $obj->ds_names = array( 'flush' => 'Flush', @@ -62,7 +62,7 @@ switch(GET('t')) { # memcached_connections-current.rrd case 'memcached_connections': require_once 'type/Default.class.php'; - $obj = new Type_Default($CONFIG); + $obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->ds_names = array( 'value' => 'Connections', @@ -77,7 +77,7 @@ switch(GET('t')) { # memcached_items-current.rrd case 'memcached_items': require_once 'type/Default.class.php'; - $obj = new Type_Default($CONFIG); + $obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->ds_names = array( 'value ' => 'Items', @@ -92,7 +92,7 @@ switch(GET('t')) { # memcached_octets.rrd case 'memcached_octets': require_once 'type/Default.class.php'; - $obj = new Type_Default($CONFIG); + $obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('rx', 'tx'); $obj->order = array('rx', 'tx'); $obj->ds_names = array( @@ -110,7 +110,7 @@ switch(GET('t')) { # memcached_ops-(evictions|hits|misses).rrd case 'memcached_ops': require_once 'type/GenericStacked.class.php'; - $obj = new Type_GenericStacked($CONFIG); + $obj = new Type_GenericStacked($CONFIG, $_GET); $obj->order = array('evictions', 'hits', 'misses'); $obj->ds_names = array( 'evictions' => 'Evictions', @@ -129,7 +129,7 @@ switch(GET('t')) { # percent-hitratio.rrd case 'percent': require_once 'type/Default.class.php'; - $obj = new Type_Default($CONFIG); + $obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('percent'); $obj->ds_names = array( 'percent ' => 'Percentage', @@ -143,7 +143,7 @@ switch(GET('t')) { # ps_count.rrd case 'ps_count': require_once 'type/Default.class.php'; - $obj = new Type_Default($CONFIG); + $obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('threads'); $obj->order = array('threads'); $obj->ds_names = array( @@ -159,7 +159,7 @@ switch(GET('t')) { # ps_cputime.rrd case 'ps_cputime': require_once 'type/Default.class.php'; - $obj = new Type_Default($CONFIG); + $obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('user', 'syst'); $obj->order = array('user', 'syst'); $obj->ds_names = array( diff --git a/plugin/memory.php b/plugin/memory.php index 3c9a745..20fb200 100644 --- a/plugin/memory.php +++ b/plugin/memory.php @@ -13,7 +13,7 @@ require_once 'inc/collectd.inc.php'; # memory/memory-free.rrd # memory/memory-used.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->order = array('free', 'inactive', 'buffered', 'cached', 'cache', 'locked', 'used', 'active', 'wired'); $obj->ds_names = array( 'free' => 'Free', diff --git a/plugin/mysql.php b/plugin/mysql.php index 3d8b25b..445176b 100644 --- a/plugin/mysql.php +++ b/plugin/mysql.php @@ -6,7 +6,7 @@ require_once 'conf/common.inc.php'; require_once 'type/GenericStacked.class.php'; require_once 'inc/collectd.inc.php'; -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) diff --git a/plugin/netlink.php b/plugin/netlink.php index df78515..2dfbab6 100644 --- a/plugin/netlink.php +++ b/plugin/netlink.php @@ -6,7 +6,7 @@ require_once 'conf/common.inc.php'; require_once 'type/GenericStacked.class.php'; require_once 'inc/collectd.inc.php'; -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->rrd_format = '%5.1lf%s'; diff --git a/plugin/nfs.php b/plugin/nfs.php index 9ae9196..efcfd1e 100644 --- a/plugin/nfs.php +++ b/plugin/nfs.php @@ -12,7 +12,7 @@ require_once 'inc/collectd.inc.php'; ## LAYOUT # nfs-XX/nfs_procedure-YY.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->data_sources = array('value'); switch($obj->args['pinstance']) { case 'v2client': diff --git a/plugin/nginx.php b/plugin/nginx.php index 9d51a8e..d55a886 100644 --- a/plugin/nginx.php +++ b/plugin/nginx.php @@ -16,7 +16,7 @@ require_once 'inc/collectd.inc.php'; # nginx/nginx_connections-writing.rrd # nginx/nginx_requests.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); switch($obj->args['type']) { diff --git a/plugin/ntpd.php b/plugin/ntpd.php index ebd1fa6..1260c57 100644 --- a/plugin/ntpd.php +++ b/plugin/ntpd.php @@ -13,7 +13,7 @@ require_once 'inc/collectd.inc.php'; # ntpd/time_dispersion-.rrd # ntpd/time_offset-.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->ds_names = array('ping' => 'Ping time', 'ping_stddev' => 'Ping stddev', 'ping_droprate' => 'Ping droprate'); diff --git a/plugin/nut.php b/plugin/nut.php index 848b09b..b1d1610 100644 --- a/plugin/nut.php +++ b/plugin/nut.php @@ -14,7 +14,7 @@ require_once 'inc/collectd.inc.php'; # nut-XXXX/timeleft-XXXX.rrd # nut-XXXX/voltage-XXXX.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); switch($obj->args['type']) { case 'frequency': if ($CONFIG['version'] < 5) { diff --git a/plugin/openvpn.php b/plugin/openvpn.php index 0f1a2c2..429964b 100644 --- a/plugin/openvpn.php +++ b/plugin/openvpn.php @@ -13,7 +13,7 @@ require_once 'inc/collectd.inc.php'; switch(GET('t')) { case 'if_octets': require_once 'type/GenericIO.class.php'; - $obj = new Type_GenericIO($CONFIG); + $obj = new Type_GenericIO($CONFIG, $_GET); $obj->data_sources = array('rx', 'tx'); $obj->ds_names = array( 'rx' => 'Receive', @@ -30,7 +30,7 @@ switch(GET('t')) { break; case 'users': require_once 'type/Default.class.php'; - $obj = new Type_Default($CONFIG); + $obj = new Type_Default($CONFIG, $_GET); $obj->ds_names = array( 'value' => 'Users', ); diff --git a/plugin/ping.php b/plugin/ping.php index 5836703..1da00c2 100644 --- a/plugin/ping.php +++ b/plugin/ping.php @@ -12,7 +12,7 @@ require_once 'inc/collectd.inc.php'; # ping/ping_stddev-.rrd # ping/ping_droprate-.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->ds_names = array('ping' => 'Ping time', 'ping_stddev' => 'Ping stddev', diff --git a/plugin/postgresql.php b/plugin/postgresql.php index 361322d..03e5cee 100644 --- a/plugin/postgresql.php +++ b/plugin/postgresql.php @@ -21,7 +21,7 @@ require_once 'inc/collectd.inc.php'; # postgresql-X/pg_n_tup_c-ins.rrd # postgresql-X/pg_n_tup_c-upd.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) { diff --git a/plugin/powerdns.php b/plugin/powerdns.php index b62d06d..55312e9 100644 --- a/plugin/powerdns.php +++ b/plugin/powerdns.php @@ -7,7 +7,7 @@ require_once 'type/Default.class.php'; require_once 'inc/collectd.inc.php'; -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->rrd_title = sprintf('PowerDNS %s (%s)', $obj->args['type'], $obj->args['pinstance']); $obj->rrd_format = '%5.1lf%s'; diff --git a/plugin/processes.php b/plugin/processes.php index 96fde2d..54c1ad7 100644 --- a/plugin/processes.php +++ b/plugin/processes.php @@ -15,7 +15,7 @@ require_once 'inc/collectd.inc.php'; # processes/ps_state-running.rrd # processes/ps_state-sleeping.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) diff --git a/plugin/sensors.php b/plugin/sensors.php index 9daf662..ba31487 100644 --- a/plugin/sensors.php +++ b/plugin/sensors.php @@ -12,7 +12,7 @@ require_once 'inc/collectd.inc.php'; # sensors-XXXX/temerature-XXXX.rrd # sensors-XXXX/voltage-XXXX.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->ds_names = array( 'value' => 'Value', ); diff --git a/plugin/snmp.php b/plugin/snmp.php index d3cdb96..680d94f 100644 --- a/plugin/snmp.php +++ b/plugin/snmp.php @@ -9,7 +9,7 @@ require_once 'inc/collectd.inc.php'; switch(GET('t')) { case 'if_octets': require_once 'type/GenericIO.class.php'; - $obj = new Type_GenericIO($CONFIG); + $obj = new Type_GenericIO($CONFIG, $_GET); $obj->data_sources = array('rx', 'tx'); $obj->ds_names = array( 'rx' => 'Receive', @@ -25,7 +25,7 @@ switch(GET('t')) { break; default: require_once 'type/Default.class.php'; - $obj = new Type_Default($CONFIG); + $obj = new Type_Default($CONFIG, $_GET); $obj->rrd_title = sprintf('SNMP: %s (%s)', $obj->args['type'], $obj->args['tinstance']); break; } diff --git a/plugin/swap.php b/plugin/swap.php index 863c600..983d38d 100644 --- a/plugin/swap.php +++ b/plugin/swap.php @@ -14,7 +14,7 @@ require_once 'inc/collectd.inc.php'; switch(GET('t')) { case 'swap': require_once 'type/GenericStacked.class.php'; - $obj = new Type_GenericStacked($CONFIG); + $obj = new Type_GenericStacked($CONFIG, $_GET); $obj->order = array('free', 'cached', 'used'); $obj->ds_names = array( 'free' => 'Free', @@ -31,7 +31,7 @@ switch(GET('t')) { break; case 'swap_io': require_once 'type/GenericIO.class.php'; - $obj = new Type_GenericIO($CONFIG); + $obj = new Type_GenericIO($CONFIG, $_GET); $obj->order = array('out', 'in'); $obj->ds_names = array( 'out' => 'Out', diff --git a/plugin/tail.php b/plugin/tail.php index 3afcc2e..4e23174 100644 --- a/plugin/tail.php +++ b/plugin/tail.php @@ -7,7 +7,7 @@ require_once 'type/Default.class.php'; require_once 'inc/collectd.inc.php'; -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->rrd_title = sprintf('tail: %s (%s)', $obj->args['pinstance'], $obj->args['type']); $obj->rrd_format = '%5.1lf%s'; diff --git a/plugin/tcpconns.php b/plugin/tcpconns.php index bd23de7..1e6917a 100644 --- a/plugin/tcpconns.php +++ b/plugin/tcpconns.php @@ -10,7 +10,7 @@ require_once 'inc/collectd.inc.php'; # tcpconns-XXXX/ # tcpconns-XXXX/tcp_connections-XXXX.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->rrd_title = sprintf('TCP Connections (%s)', $obj->args['pinstance']); $obj->rrd_vertical = '#'; $obj->rrd_format = '%5.1lf'; diff --git a/plugin/thermal.php b/plugin/thermal.php index 50789d0..b2fa74c 100644 --- a/plugin/thermal.php +++ b/plugin/thermal.php @@ -10,7 +10,7 @@ require_once 'inc/collectd.inc.php'; # thermal-XXXX/ # thermal-XXXX/gauge.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->ds_names = array( 'value' => 'Temperature', ); diff --git a/plugin/uptime.php b/plugin/uptime.php index 60a106a..1d432a9 100644 --- a/plugin/uptime.php +++ b/plugin/uptime.php @@ -9,7 +9,7 @@ require_once 'inc/collectd.inc.php'; ## LAYOUT # uptime/uptime.rrd -$obj = new Type_Uptime($CONFIG); +$obj = new Type_Uptime($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->ds_names = array( 'value' => 'Current', diff --git a/plugin/users.php b/plugin/users.php index 2cb2427..f4cde28 100644 --- a/plugin/users.php +++ b/plugin/users.php @@ -9,7 +9,7 @@ require_once 'inc/collectd.inc.php'; ## LAYOUT # users/users.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->ds_names = array( 'value' => 'Users', diff --git a/plugin/varnish.php b/plugin/varnish.php index 78d33bd..6b199b7 100644 --- a/plugin/varnish.php +++ b/plugin/varnish.php @@ -22,7 +22,7 @@ require_once 'inc/collectd.inc.php'; #varnish-default-connections/connections-dropped.rrd #varnish-default-connections/connections-received.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->rrd_format = '%5.1lf%s'; $obj->rrd_title = sprintf('%s (%s)', ucfirst($obj->args['pinstance']), $obj->args['category']); $obj->rrd_vertical = 'hits'; diff --git a/plugin/vmem.php b/plugin/vmem.php index 9a17ed4..3e1a64c 100644 --- a/plugin/vmem.php +++ b/plugin/vmem.php @@ -13,7 +13,7 @@ require_once 'inc/collectd.inc.php'; # vmem/vmpage_io-swapy.rrd # vmem/vmpage_number-.rrd -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) { diff --git a/plugin/vserver.php b/plugin/vserver.php index 186166d..8eee8db 100644 --- a/plugin/vserver.php +++ b/plugin/vserver.php @@ -25,14 +25,14 @@ require_once 'inc/collectd.inc.php'; # vserver-XXXX/vs_threads-total.rrd # vserver-XXXX/vs_threads-uninterruptable.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); switch($obj->args['type']) { case 'load': require_once "plugin/load.php"; break; case 'vs_memory': - $obj = new Type_GenericStacked($CONFIG); + $obj = new Type_GenericStacked($CONFIG, $_GET); $obj->order = array('vm', 'vml', 'rss', 'anon'); # http://oldwiki.linux-vserver.org/Memory+Allocation $obj->ds_names = array( @@ -56,7 +56,7 @@ switch($obj->args['type']) { $obj->rrd_graph(); break; case 'vs_threads': - $obj = new Type_GenericStacked($CONFIG); + $obj = new Type_GenericStacked($CONFIG, $_GET); $obj->order = array('running', 'uninterruptable', 'onhold', 'total'); # http://linux-vserver.org/ProcFS $obj->ds_names = array( diff --git a/plugin/wireless.php b/plugin/wireless.php index 9d391ec..70598b5 100644 --- a/plugin/wireless.php +++ b/plugin/wireless.php @@ -6,7 +6,7 @@ require_once 'conf/common.inc.php'; require_once 'type/GenericStacked.class.php'; require_once 'inc/collectd.inc.php'; -$obj = new Type_GenericStacked($CONFIG); +$obj = new Type_GenericStacked($CONFIG, $_GET); $obj->data_sources = array('value'); $obj->ds_names = array('value' => 'Value'); $obj->colors = array('value' => '0000f0'); diff --git a/plugin/zfs_arc.php b/plugin/zfs_arc.php index 57a3bec..85f3016 100644 --- a/plugin/zfs_arc.php +++ b/plugin/zfs_arc.php @@ -15,7 +15,7 @@ require_once 'inc/collectd.inc.php'; # zfs_arc/arc_ratio-L2.rrd # zfs_arc/arc_size.rrd -$obj = new Type_Default($CONFIG); +$obj = new Type_Default($CONFIG, $_GET); $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) { -- cgit v1.1