aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin
diff options
context:
space:
mode:
authorPim van den Berg2010-03-21 13:52:04 +0100
committerPim van den Berg2010-03-21 14:02:59 +0100
commit17341689a4a65dcb95684d6e2aec12216f76ffeb (patch)
treebb5d3405bde077744c2008166ded300134569072 /plugin
parentfix: file2identifier must return identifiers (not basenames) (diff)
downloadapt-panopticon_cgp-17341689a4a65dcb95684d6e2aec12216f76ffeb.zip
apt-panopticon_cgp-17341689a4a65dcb95684d6e2aec12216f76ffeb.tar.gz
apt-panopticon_cgp-17341689a4a65dcb95684d6e2aec12216f76ffeb.tar.bz2
apt-panopticon_cgp-17341689a4a65dcb95684d6e2aec12216f76ffeb.tar.xz
add apache plugin
Diffstat (limited to 'plugin')
-rw-r--r--plugin/apache.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/plugin/apache.php b/plugin/apache.php
new file mode 100644
index 0000000..1dc3540
--- /dev/null
+++ b/plugin/apache.php
@@ -0,0 +1,51 @@
1<?php
2
3# Collectd Apache plugin
4
5require_once 'conf/common.inc.php';
6require_once 'type/GenericStacked.class.php';
7require_once 'inc/collectd.inc.php';
8
9## LAYOUT
10# apache-X/apache_scoreboard-X.rrd
11
12$obj = new Type_GenericStacked($CONFIG);
13$obj->data_sources = array('count');
14$obj->order = array('open', 'idle_cleanup', 'finishing', 'logging', 'closing', 'dnslookup', 'keepalive', 'sending', 'reading', 'starting', 'waiting');
15$obj->ds_names = array(
16 'open' => 'Open (empty) ',
17 'waiting' => 'Waiting ',
18 'starting' => 'Starting up ',
19 'reading' => 'Reading request',
20 'sending' => 'Sending reply ',
21 'keepalive' => 'Keepalive ',
22 'dnslookup' => 'DNS Lookup ',
23 'closing' => 'Closing ',
24 'logging' => 'Logging ',
25 'finishing' => 'Finishing ',
26 'idle_cleanup' => 'Idle cleanup ',
27);
28$obj->colors = array(
29 'open' => 'e0e0e0',
30 'waiting' => 'ffb000',
31 'starting' => 'ff00ff',
32 'reading' => '0000ff',
33 'sending' => '00e000',
34 'keepalive' => '0080ff',
35 'dnslookup' => 'ff0000',
36 'closing' => '000080',
37 'logging' => 'a000a0',
38 'finishing' => '008080',
39 'idle_cleanup' => 'ffff00',
40);
41$obj->width = $width;
42$obj->heigth = $heigth;
43
44$obj->rrd_title = sprintf('Scoreboard of %s', $obj->args['pinstance']);
45$obj->rrd_vertical = 'Slots';
46$obj->rrd_format = '%5.1lf';
47
48collectd_flush($obj->identifiers);
49$obj->rrd_graph();
50
51?>