diff options
Diffstat (limited to '')
| -rw-r--r-- | plugin/apache.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugin/apache.php b/plugin/apache.php index 99fc689..95c12fa 100644 --- a/plugin/apache.php +++ b/plugin/apache.php | |||
| @@ -19,10 +19,10 @@ switch ($obj->args['type']) { | |||
| 19 | case 'apache_bytes': | 19 | case 'apache_bytes': |
| 20 | $obj->data_sources = array('value'); | 20 | $obj->data_sources = array('value'); |
| 21 | $obj->ds_names = array( | 21 | $obj->ds_names = array( |
| 22 | $obj->args['type'] => 'Bytes/s', | 22 | 'value' => 'Bytes/s', |
| 23 | ); | 23 | ); |
| 24 | $obj->colors = array( | 24 | $obj->colors = array( |
| 25 | $obj->args['type'] => '0000ff', | 25 | 'value' => '0000ff', |
| 26 | ); | 26 | ); |
| 27 | $obj->rrd_title = sprintf('Webserver Traffic%s', | 27 | $obj->rrd_title = sprintf('Webserver Traffic%s', |
| 28 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); | 28 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); |
| @@ -31,10 +31,10 @@ switch ($obj->args['type']) { | |||
| 31 | case 'apache_connections': | 31 | case 'apache_connections': |
| 32 | $obj->data_sources = array('value'); | 32 | $obj->data_sources = array('value'); |
| 33 | $obj->ds_names = array( | 33 | $obj->ds_names = array( |
| 34 | $obj->args['type'] => 'Conns/s', | 34 | 'value' => 'Conns/s', |
| 35 | ); | 35 | ); |
| 36 | $obj->colors = array( | 36 | $obj->colors = array( |
| 37 | $obj->args['type'] => '00b000', | 37 | 'value' => '00b000', |
| 38 | ); | 38 | ); |
| 39 | $obj->rrd_title = sprintf('Webserver Connections%s', | 39 | $obj->rrd_title = sprintf('Webserver Connections%s', |
| 40 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); | 40 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); |
| @@ -43,10 +43,10 @@ switch ($obj->args['type']) { | |||
| 43 | case 'apache_idle_workers': | 43 | case 'apache_idle_workers': |
| 44 | $obj->data_sources = array('value'); | 44 | $obj->data_sources = array('value'); |
| 45 | $obj->ds_names = array( | 45 | $obj->ds_names = array( |
| 46 | $obj->args['type'] => 'Workers', | 46 | 'value' => 'Workers', |
| 47 | ); | 47 | ); |
| 48 | $obj->colors = array( | 48 | $obj->colors = array( |
| 49 | $obj->args['type'] => '0000ff', | 49 | 'value' => '0000ff', |
| 50 | ); | 50 | ); |
| 51 | $obj->rrd_title = sprintf('Webserver Idle Workers%s', | 51 | $obj->rrd_title = sprintf('Webserver Idle Workers%s', |
| 52 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); | 52 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); |
| @@ -55,10 +55,10 @@ switch ($obj->args['type']) { | |||
| 55 | case 'apache_requests': | 55 | case 'apache_requests': |
| 56 | $obj->data_sources = array('value'); | 56 | $obj->data_sources = array('value'); |
| 57 | $obj->ds_names = array( | 57 | $obj->ds_names = array( |
| 58 | $obj->args['type'] => 'Requests/s', | 58 | 'value' => 'Requests/s', |
| 59 | ); | 59 | ); |
| 60 | $obj->colors = array( | 60 | $obj->colors = array( |
| 61 | $obj->args['type'] => '00b000', | 61 | 'value' => '00b000', |
| 62 | ); | 62 | ); |
| 63 | $obj->rrd_title = sprintf('Webserver Requests%s', | 63 | $obj->rrd_title = sprintf('Webserver Requests%s', |
| 64 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); | 64 | !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); |
| @@ -157,12 +157,12 @@ $obj->rrd_format = '%5.1lf'; | |||
| 157 | if ($CONFIG['version'] < 5) { | 157 | if ($CONFIG['version'] < 5) { |
| 158 | $obj->data_sources = array('count'); | 158 | $obj->data_sources = array('count'); |
| 159 | if (count($obj->ds_names) == 1) { | 159 | if (count($obj->ds_names) == 1) { |
| 160 | $obj->ds_names['count'] = $obj->ds_names[$obj->args['type']]; | 160 | $obj->ds_names['count'] = $obj->ds_names['value']; |
| 161 | unset($obj->ds_names[$obj->args['type']]); | 161 | unset($obj->ds_names['value']); |
| 162 | } | 162 | } |
| 163 | if (count($obj->colors) == 1) { | 163 | if (count($obj->colors) == 1) { |
| 164 | $obj->colors['count'] = $obj->colors[$obj->args['type']]; | 164 | $obj->colors['count'] = $obj->colors['value']; |
| 165 | unset($obj->colors[$obj->args['type']]); | 165 | unset($obj->colors['value']); |
| 166 | } | 166 | } |
| 167 | } | 167 | } |
| 168 | 168 | ||
