From a2814f6a4b46a5d9e86146c837ae11343dde4ea7 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 13 May 2013 20:41:14 +0200 Subject: move width/heigth from plugins to type __construct --- plugin/apache.php | 2 -- 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/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/iptables.php | 2 -- plugin/irq.php | 2 -- plugin/libvirt.php | 2 -- plugin/load.php | 2 -- plugin/md.php | 2 -- plugin/memcached.php | 2 -- 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/ping.php | 2 -- plugin/postgresql.php | 2 -- plugin/powerdns.php | 2 -- plugin/processes.php | 2 -- plugin/sensors.php | 2 -- plugin/snmp.php | 2 -- plugin/swap.php | 2 -- plugin/tail.php | 2 -- plugin/tcpconns.php | 2 -- plugin/uptime.php | 2 -- plugin/users.php | 2 -- plugin/varnish.php | 2 -- plugin/vmem.php | 2 -- plugin/vserver.php | 8 -------- plugin/wireless.php | 2 -- plugin/zfs_arc.php | 2 -- 45 files changed, 96 deletions(-) (limited to 'plugin') diff --git a/plugin/apache.php b/plugin/apache.php index c942255..7e4919a 100644 --- a/plugin/apache.php +++ b/plugin/apache.php @@ -150,8 +150,6 @@ switch ($obj->args['type']) { break; } -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf'; # backwards compatibility diff --git a/plugin/apcups.php b/plugin/apcups.php index 07498f0..faa586e 100644 --- a/plugin/apcups.php +++ b/plugin/apcups.php @@ -18,8 +18,6 @@ require_once 'inc/collectd.inc.php'; # apcups/voltage-output.rrd $obj = new Type_Default($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; switch($obj->args['type']) { case 'charge': diff --git a/plugin/battery.php b/plugin/battery.php index ade645c..b03aba7 100644 --- a/plugin/battery.php +++ b/plugin/battery.php @@ -13,8 +13,6 @@ require_once 'inc/collectd.inc.php'; # battery-X/voltage.rrd $obj = new Type_Default($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->colors = array( 'value' => '0000f0', ); diff --git a/plugin/bind.php b/plugin/bind.php index 0eb0a0d..e6d562c 100644 --- a/plugin/bind.php +++ b/plugin/bind.php @@ -8,8 +8,6 @@ require_once 'inc/collectd.inc.php'; $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $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 6c38776..0415f2a 100644 --- a/plugin/conntrack.php +++ b/plugin/conntrack.php @@ -17,8 +17,6 @@ $obj->ds_names = array( $obj->colors = array( 'value' => '0000f0', ); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = 'Conntrack entries'; $obj->rrd_vertical = '#'; $obj->rrd_format = '%.1lf'; diff --git a/plugin/contextswitch.php b/plugin/contextswitch.php index 701a3a7..45b5f30 100644 --- a/plugin/contextswitch.php +++ b/plugin/contextswitch.php @@ -17,8 +17,6 @@ $obj->ds_names = array( $obj->colors = array( 'value' => '0000f0', ); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = 'Context switches'; $obj->rrd_vertical = 'switch per second Bits'; $obj->rrd_format = '%4.0lf'; diff --git a/plugin/cpu.php b/plugin/cpu.php index a0a19fc..a886f97 100644 --- a/plugin/cpu.php +++ b/plugin/cpu.php @@ -40,8 +40,6 @@ $obj->colors = array( 'interrupt' => 'a000a0', 'steal' => '000000', ); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = sprintf('CPU-%s usage', $obj->args['pinstance']); $obj->rrd_vertical = 'Jiffies'; diff --git a/plugin/cpufreq.php b/plugin/cpufreq.php index fd18dc8..99f51c6 100644 --- a/plugin/cpufreq.php +++ b/plugin/cpufreq.php @@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php'; $obj = new Type_Default($CONFIG); $obj->data_sources = array('value'); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = 'CPU frequency scaling'; $obj->rrd_vertical = 'Hz'; $obj->rrd_format = '%5.1lf%s'; diff --git a/plugin/df.php b/plugin/df.php index b5c7e73..16f5749 100644 --- a/plugin/df.php +++ b/plugin/df.php @@ -25,8 +25,6 @@ $obj->colors = array( 'free' => '00ff00', 'used' => 'ff0000', ); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = sprintf('Free space (%s)', $obj->args['pinstance']); $obj->rrd_vertical = 'Bytes'; diff --git a/plugin/disk.php b/plugin/disk.php index e3a5f3d..763ae10 100644 --- a/plugin/disk.php +++ b/plugin/disk.php @@ -23,8 +23,6 @@ $obj->colors = array( 'read' => '0000ff', 'write' => '00b000', ); -$obj->width = $width; -$obj->heigth = $heigth; switch($obj->args['type']) { case 'disk_merged': $obj->rrd_title = sprintf('Disk Merged Operations (%s)', $obj->args['pinstance']); diff --git a/plugin/dns.php b/plugin/dns.php index d0322f1..d9bc759 100644 --- a/plugin/dns.php +++ b/plugin/dns.php @@ -13,8 +13,6 @@ require_once 'inc/collectd.inc.php'; # dns/dns_qtype-X.rrd $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) { diff --git a/plugin/entropy.php b/plugin/entropy.php index bc1c95f..1c7f763 100644 --- a/plugin/entropy.php +++ b/plugin/entropy.php @@ -17,8 +17,6 @@ $obj->ds_names = array( $obj->colors = array( 'value' => '0000f0', ); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = 'Available entropy'; $obj->rrd_vertical = 'Bits'; $obj->rrd_format = '%4.0lf'; diff --git a/plugin/filecount.php b/plugin/filecount.php index 2c318a9..daa9fd9 100644 --- a/plugin/filecount.php +++ b/plugin/filecount.php @@ -13,8 +13,6 @@ require_once 'inc/collectd.inc.php'; $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; $obj->data_sources = array('value'); diff --git a/plugin/hddtemp.php b/plugin/hddtemp.php index 1c90b78..2df7f35 100644 --- a/plugin/hddtemp.php +++ b/plugin/hddtemp.php @@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php'; $obj = new Type_Default($CONFIG); $obj->ds_names = array('temperature' => 'Temperature'); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = 'HDD Temperature'; $obj->rrd_vertical = '°C'; $obj->rrd_format = '%.1lf'; diff --git a/plugin/interface.php b/plugin/interface.php index 777f953..c8828b2 100644 --- a/plugin/interface.php +++ b/plugin/interface.php @@ -27,8 +27,6 @@ $obj->colors = array( 'rx' => '0000ff', 'tx' => '00b000', ); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; $instance = $CONFIG['version'] < 5 ? 'tinstance' : 'pinstance'; diff --git a/plugin/ip6tables.php b/plugin/ip6tables.php index 1f0d631..6d0304b 100644 --- a/plugin/ip6tables.php +++ b/plugin/ip6tables.php @@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php'; # ip6tables/ipt_packets-XXX.rrd $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->data_sources = array('value'); switch($_GET['t']) { diff --git a/plugin/iptables.php b/plugin/iptables.php index 8e5fa89..7b12f51 100644 --- a/plugin/iptables.php +++ b/plugin/iptables.php @@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php'; # iptables/ipt_packets-XXX.rrd $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->data_sources = array('value'); switch($_GET['t']) { diff --git a/plugin/irq.php b/plugin/irq.php index 406b707..e4e32f6 100644 --- a/plugin/irq.php +++ b/plugin/irq.php @@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php'; # irq/irq-XX.rrd $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = 'Interrupts'; $obj->rrd_vertical = 'IRQs/s'; diff --git a/plugin/libvirt.php b/plugin/libvirt.php index 004eb26..1cc05c2 100644 --- a/plugin/libvirt.php +++ b/plugin/libvirt.php @@ -130,8 +130,6 @@ switch($obj->args['type']) { break; } -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; if ($CONFIG['version'] < 5 && count($obj->data_sources) == 1) { diff --git a/plugin/load.php b/plugin/load.php index a8cc678..fe2305c 100644 --- a/plugin/load.php +++ b/plugin/load.php @@ -21,8 +21,6 @@ $obj->colors = array( 'midterm' => '0000ff', 'longterm' => 'ff0000', ); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = 'System load'; $obj->rrd_vertical = 'System load'; $obj->rrd_format = '%.2lf'; diff --git a/plugin/md.php b/plugin/md.php index abbf963..56df8a3 100644 --- a/plugin/md.php +++ b/plugin/md.php @@ -14,8 +14,6 @@ $obj = new Type_Default($CONFIG); $obj->ds_names = array( 'value' => 'Value', ); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = sprintf('Disks (md-%s)', $obj->args['pinstance']); $obj->rrd_vertical = '#'; $obj->rrd_format = '%2.0lf'; diff --git a/plugin/memcached.php b/plugin/memcached.php index 60887bc..ee80caf 100644 --- a/plugin/memcached.php +++ b/plugin/memcached.php @@ -175,8 +175,6 @@ switch(GET('t')) { break; } -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; collectd_flush($obj->identifiers); diff --git a/plugin/memory.php b/plugin/memory.php index 14779e2..ce973db 100644 --- a/plugin/memory.php +++ b/plugin/memory.php @@ -29,8 +29,6 @@ $obj->colors = array( 'locked' => 'ff00ff', 'used' => 'ff0000', ); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = 'Physical memory utilization'; $obj->rrd_vertical = 'Bytes'; diff --git a/plugin/mysql.php b/plugin/mysql.php index acab7ac..3d8b25b 100644 --- a/plugin/mysql.php +++ b/plugin/mysql.php @@ -7,8 +7,6 @@ require_once 'type/GenericStacked.class.php'; require_once 'inc/collectd.inc.php'; $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) diff --git a/plugin/netlink.php b/plugin/netlink.php index 146545e..df78515 100644 --- a/plugin/netlink.php +++ b/plugin/netlink.php @@ -8,8 +8,6 @@ require_once 'inc/collectd.inc.php'; $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) { diff --git a/plugin/nfs.php b/plugin/nfs.php index b9bc78e..9ae9196 100644 --- a/plugin/nfs.php +++ b/plugin/nfs.php @@ -24,8 +24,6 @@ switch($obj->args['pinstance']) { break; } -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = sprintf('NFS-%s Procedures', $obj->args['pinstance']); $obj->rrd_vertical = 'Procedures'; diff --git a/plugin/nginx.php b/plugin/nginx.php index b05cd67..b6723fc 100644 --- a/plugin/nginx.php +++ b/plugin/nginx.php @@ -47,8 +47,6 @@ switch($obj->args['type']) break; } -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; collectd_flush($obj->identifiers); diff --git a/plugin/ntpd.php b/plugin/ntpd.php index fc38c32..ebd1fa6 100644 --- a/plugin/ntpd.php +++ b/plugin/ntpd.php @@ -17,8 +17,6 @@ $obj = new Type_Default($CONFIG); $obj->ds_names = array('ping' => 'Ping time', 'ping_stddev' => 'Ping stddev', 'ping_droprate' => 'Ping droprate'); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) { diff --git a/plugin/nut.php b/plugin/nut.php index e97233c..a1ade0e 100644 --- a/plugin/nut.php +++ b/plugin/nut.php @@ -15,8 +15,6 @@ require_once 'inc/collectd.inc.php'; # nut-XXXX/voltage-XXXX.rrd $obj = new Type_Default($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; switch($obj->args['type']) { case 'frequency': $obj->data_sources = array('value'); diff --git a/plugin/ping.php b/plugin/ping.php index f2845f1..042586a 100644 --- a/plugin/ping.php +++ b/plugin/ping.php @@ -17,8 +17,6 @@ $obj->data_sources = array('value'); $obj->ds_names = array('ping' => 'Ping time', 'ping_stddev' => 'Ping stddev', 'ping_droprate' => 'Ping droprate'); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf'; switch($obj->args['type']) { diff --git a/plugin/postgresql.php b/plugin/postgresql.php index 1eadc8d..361322d 100644 --- a/plugin/postgresql.php +++ b/plugin/postgresql.php @@ -22,8 +22,6 @@ require_once 'inc/collectd.inc.php'; # postgresql-X/pg_n_tup_c-upd.rrd $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) { diff --git a/plugin/powerdns.php b/plugin/powerdns.php index c8508cc..b62d06d 100644 --- a/plugin/powerdns.php +++ b/plugin/powerdns.php @@ -8,8 +8,6 @@ require_once 'inc/collectd.inc.php'; $obj = new Type_Default($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $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 dca00b7..96fde2d 100644 --- a/plugin/processes.php +++ b/plugin/processes.php @@ -16,8 +16,6 @@ require_once 'inc/collectd.inc.php'; # processes/ps_state-sleeping.rrd $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) diff --git a/plugin/sensors.php b/plugin/sensors.php index 3f23e98..9daf662 100644 --- a/plugin/sensors.php +++ b/plugin/sensors.php @@ -16,8 +16,6 @@ $obj = new Type_Default($CONFIG); $obj->ds_names = array( 'value' => 'Value', ); -$obj->width = $width; -$obj->heigth = $heigth; switch($obj->args['type']) { case 'fanspeed': $obj->rrd_title = sprintf('Fanspeed (%s)', $obj->args['pinstance']); diff --git a/plugin/snmp.php b/plugin/snmp.php index 476f4ed..4650dd9 100644 --- a/plugin/snmp.php +++ b/plugin/snmp.php @@ -29,8 +29,6 @@ switch(GET('t')) { } $obj->rrd_format = '%5.1lf%s'; -$obj->width = $width; -$obj->heigth = $heigth; collectd_flush($obj->identifiers); $obj->rrd_graph(); diff --git a/plugin/swap.php b/plugin/swap.php index c24d90b..863c600 100644 --- a/plugin/swap.php +++ b/plugin/swap.php @@ -46,8 +46,6 @@ switch(GET('t')) { break; } -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; collectd_flush($obj->identifiers); diff --git a/plugin/tail.php b/plugin/tail.php index 821aff8..0d3ca46 100644 --- a/plugin/tail.php +++ b/plugin/tail.php @@ -8,8 +8,6 @@ require_once 'inc/collectd.inc.php'; $obj = new Type_Default($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $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 f0d99ae..bd23de7 100644 --- a/plugin/tcpconns.php +++ b/plugin/tcpconns.php @@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php'; # tcpconns-XXXX/tcp_connections-XXXX.rrd $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = sprintf('TCP Connections (%s)', $obj->args['pinstance']); $obj->rrd_vertical = '#'; $obj->rrd_format = '%5.1lf'; diff --git a/plugin/uptime.php b/plugin/uptime.php index 4331ab9..60a106a 100644 --- a/plugin/uptime.php +++ b/plugin/uptime.php @@ -17,8 +17,6 @@ $obj->ds_names = array( $obj->colors = array( 'value' => '00e000', ); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = 'Uptime'; $obj->rrd_vertical = 'Days'; $obj->rrd_format = '%.1lf'; diff --git a/plugin/users.php b/plugin/users.php index a948fc1..2cb2427 100644 --- a/plugin/users.php +++ b/plugin/users.php @@ -17,8 +17,6 @@ $obj->ds_names = array( $obj->colors = array( 'value' => '0000f0', ); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_title = 'Users'; $obj->rrd_vertical = 'Users'; $obj->rrd_format = '%.1lf'; diff --git a/plugin/varnish.php b/plugin/varnish.php index 8099691..78d33bd 100644 --- a/plugin/varnish.php +++ b/plugin/varnish.php @@ -23,8 +23,6 @@ require_once 'inc/collectd.inc.php'; #varnish-default-connections/connections-received.rrd $obj = new Type_Default($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $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 fae94f8..9a17ed4 100644 --- a/plugin/vmem.php +++ b/plugin/vmem.php @@ -14,8 +14,6 @@ require_once 'inc/collectd.inc.php'; # vmem/vmpage_number-.rrd $obj = new Type_GenericStacked($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) { diff --git a/plugin/vserver.php b/plugin/vserver.php index c727ad9..186166d 100644 --- a/plugin/vserver.php +++ b/plugin/vserver.php @@ -47,8 +47,6 @@ switch($obj->args['type']) { 'rss' => 'ffb000', 'anon' => 'ff00ff', ); - $obj->width = $width; - $obj->heigth = $heigth; $obj->rrd_title = sprintf('Memory utilization on Vserver %s', $obj->args['pinstance']); $obj->rrd_vertical = 'Bytes'; @@ -73,8 +71,6 @@ switch($obj->args['type']) { 'total' => 'ffb000', 'uninterruptable' => 'ff00ff', ); - $obj->width = $width; - $obj->heigth = $heigth; $obj->rrd_title = sprintf('Threads on Vserver %s', $obj->args['pinstance']); $obj->rrd_vertical = 'Numbers'; @@ -106,8 +102,6 @@ switch($obj->args['type']) { $obj->rrd_title = sprintf('Traffic on Vserver %s', $obj->args['pinstance']); $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize'])); $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; - $obj->width = $width; - $obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; collectd_flush($obj->identifiers); @@ -121,8 +115,6 @@ switch($obj->args['type']) { $obj->rrd_title = sprintf('Processes on Vserver %s', $obj->args['pinstance']); $obj->rrd_vertical = 'Processes'; - $obj->width = $width; - $obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; collectd_flush($obj->identifiers); diff --git a/plugin/wireless.php b/plugin/wireless.php index 413ee28..9d391ec 100644 --- a/plugin/wireless.php +++ b/plugin/wireless.php @@ -10,8 +10,6 @@ $obj = new Type_GenericStacked($CONFIG); $obj->data_sources = array('value'); $obj->ds_names = array('value' => 'Value'); $obj->colors = array('value' => '0000f0'); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%6.1lf'; switch($obj->args['type']) { diff --git a/plugin/zfs_arc.php b/plugin/zfs_arc.php index d40912d..57a3bec 100644 --- a/plugin/zfs_arc.php +++ b/plugin/zfs_arc.php @@ -16,8 +16,6 @@ require_once 'inc/collectd.inc.php'; # zfs_arc/arc_size.rrd $obj = new Type_Default($CONFIG); -$obj->width = $width; -$obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) { -- cgit v1.1