diff options
Diffstat (limited to 'plugin/conntrack.php')
| -rw-r--r-- | plugin/conntrack.php | 30 |
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 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | require_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 | |||
| 27 | collectd_flush($obj->identifiers); | ||
| 28 | $obj->rrd_graph(); | ||
| 29 | |||
| 30 | ?> | ||
