From 6150a1ab9b087378af0d674226a9f9929401aa0c Mon Sep 17 00:00:00 2001 From: Tom Gallacher Date: Mon, 19 Jul 2010 22:05:23 +0200 Subject: plugin: add wireless plugin Signed-off-by: Pim van den Berg --- plugin/wireless.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 plugin/wireless.php (limited to 'plugin/wireless.php') diff --git a/plugin/wireless.php b/plugin/wireless.php new file mode 100644 index 0000000..6f3af36 --- /dev/null +++ b/plugin/wireless.php @@ -0,0 +1,42 @@ +width = $width; +$obj->heigth = $heigth; + +switch($obj->args['type']) { + case 'signal_noise': + $obj->data_sources = array('value'); + $obj->colors = array('value' => '0000f0'); + $obj->ds_names = array('value' => 'Value'); + $obj->rrd_title = 'Signal Noise'; + $obj->rrd_vertical = ''; + $obj->rrd_format = '%6.1lf'; + break; + case 'signal_power': + $obj->data_sources = array('value'); + $obj->colors = array('value' => '0000f0'); + $obj->ds_names = array('value' => 'Value'); + $obj->rrd_title = 'Signal Power'; + $obj->rrd_vertical = ''; + $obj->rrd_format = '%6.1lf'; + break; + case 'signal_quality': + $obj->data_sources = array('value'); + $obj->colors = array('value' => '0000f0'); + $obj->ds_names = array('value' => 'Value'); + $obj->rrd_title = 'Signal Quality'; + $obj->rrd_vertical = ''; + $obj->rrd_format = '%6.1lf'; + break; +} +collectd_flush($obj->identifiers); +$obj->rrd_graph(); + +?> -- cgit v1.1