aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/apache.php
blob: 71536621ca989f6e0405e21c767539d15efa0dab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php

# Collectd Apache plugin

require_once 'conf/common.inc.php';
require_once 'type/GenericStacked.class.php';
require_once 'inc/collectd.inc.php';

## LAYOUT
# apache-X/apache_scoreboard-X.rrd

$obj = new Type_GenericStacked($CONFIG);
$obj->data_sources = array('count');
$obj->order = array('open', 'idle_cleanup', 'finishing', 'logging', 'closing', 'dnslookup', 'keepalive', 'sending', 'reading', 'starting', 'waiting');
$obj->ds_names = array(
	'open'      => 'Open (empty)',
	'waiting'   => 'Waiting',
	'starting'  => 'Starting up',
	'reading'   => 'Reading request',
	'sending'   => 'Sending reply',
	'keepalive' => 'Keepalive',
	'dnslookup' => 'DNS Lookup',
	'closing'   => 'Closing',
	'logging'   => 'Logging',
	'finishing' => 'Finishing',
	'idle_cleanup' => 'Idle cleanup',
);
$obj->colors = array(
	'open'      => 'e0e0e0',
	'waiting'   => 'ffb000',
	'starting'  => 'ff00ff',
	'reading'   => '0000ff',
	'sending'   => '00e000',
	'keepalive' => '0080ff',
	'dnslookup' => 'ff0000',
	'closing'   => '000080',
	'logging'   => 'a000a0',
	'finishing' => '008080',
	'idle_cleanup' => 'ffff00',
);
$obj->width = $width;
$obj->heigth = $heigth;

$obj->rrd_title = sprintf('Scoreboard of %s', $obj->args['pinstance']);
$obj->rrd_vertical = 'Slots';
$obj->rrd_format = '%5.1lf';

collectd_flush($obj->identifiers);
$obj->rrd_graph();

?>