diff options
author | Manuel CISSÉ | 2010-02-23 18:10:29 +0100 |
---|---|---|
committer | Pim van den Berg | 2010-03-01 21:06:44 +0100 |
commit | 5e1bf4d4a83ac51080e33eb6ad3af4273a65c880 (patch) | |
tree | 0e4a0ee04c6950326a130031bd79901d7b56ca02 /plugin/tcpconns.php | |
parent | add hddtemp plugin (diff) | |
download | apt-panopticon_cgp-5e1bf4d4a83ac51080e33eb6ad3af4273a65c880.zip apt-panopticon_cgp-5e1bf4d4a83ac51080e33eb6ad3af4273a65c880.tar.gz apt-panopticon_cgp-5e1bf4d4a83ac51080e33eb6ad3af4273a65c880.tar.bz2 apt-panopticon_cgp-5e1bf4d4a83ac51080e33eb6ad3af4273a65c880.tar.xz |
add tcpconns plugin
Diffstat (limited to 'plugin/tcpconns.php')
-rw-r--r-- | plugin/tcpconns.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugin/tcpconns.php b/plugin/tcpconns.php new file mode 100644 index 0000000..5d8dba7 --- /dev/null +++ b/plugin/tcpconns.php | |||
@@ -0,0 +1,24 @@ | |||
1 | <?php | ||
2 | |||
3 | # Collectd TCPConns plugin | ||
4 | |||
5 | require_once 'conf/common.inc.php'; | ||
6 | require_once 'type/GenericStacked.class.php'; | ||
7 | require_once 'inc/collectd.inc.php'; | ||
8 | |||
9 | ## LAYOUT | ||
10 | # tcpconns-XXXX/ | ||
11 | # tcpconns-XXXX/tcp_connections-XXXX.rrd | ||
12 | |||
13 | $obj = new Type_GenericStacked($CONFIG); | ||
14 | $obj->width = $width; | ||
15 | $obj->heigth = $heigth; | ||
16 | $obj->generate_colors(); | ||
17 | $obj->rrd_title = sprintf('TCP Connections (%s)', $obj->args['pinstance']); | ||
18 | $obj->rrd_vertical = '#'; | ||
19 | $obj->rrd_format = '%5.1lf'; | ||
20 | |||
21 | collectd_flush($obj->identifiers); | ||
22 | $obj->rrd_graph(); | ||
23 | |||
24 | ?> | ||