aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin
diff options
context:
space:
mode:
authorManuel CISSÉ2010-03-03 17:45:29 +0100
committerPim van den Berg2010-03-06 10:41:52 +0100
commit130bfb8d982b4f6b11b324987d8d8ed25acee44d (patch)
tree8999e9bb5ffe3fc2aabf73dc0f4c2e7337d2a17a /plugin
parentautomatically generate colors for graphs (irq plugin) (diff)
downloadapt-panopticon_cgp-130bfb8d982b4f6b11b324987d8d8ed25acee44d.zip
apt-panopticon_cgp-130bfb8d982b4f6b11b324987d8d8ed25acee44d.tar.gz
apt-panopticon_cgp-130bfb8d982b4f6b11b324987d8d8ed25acee44d.tar.bz2
apt-panopticon_cgp-130bfb8d982b4f6b11b324987d8d8ed25acee44d.tar.xz
add conntrack plugin
Diffstat (limited to 'plugin')
-rw-r--r--plugin/conntrack.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/plugin/conntrack.php b/plugin/conntrack.php
new file mode 100644
index 0000000..64b4f7f
--- /dev/null
+++ b/plugin/conntrack.php
@@ -0,0 +1,30 @@
1<?php
2
3# Collectd Conntrack plugin
4
5require_once 'conf/common.inc.php';
6require_once 'type/Default.class.php';
7require_once 'inc/collectd.inc.php';
8
9## LAYOUT
10# conntrack/conntrack.rrd
11
12$obj = new Type_Default($CONFIG);
13# the data source is named 'entropy' in collectd's types.db
14$obj->data_sources = array('entropy');
15$obj->ds_names = array(
16 'entropy' => 'Conntrack entries',
17);
18$obj->colors = array(
19 'entropy' => '0000f0',
20);
21$obj->width = $width;
22$obj->heigth = $heigth;
23$obj->rrd_title = 'Conntrack entries';
24$obj->rrd_vertical = '#';
25$obj->rrd_format = '%.1lf';
26
27collectd_flush($obj->identifiers);
28$obj->rrd_graph();
29
30?>