diff options
Diffstat (limited to '')
| -rw-r--r-- | plugin/wireless.php | 42 |
1 files changed, 42 insertions, 0 deletions
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 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Wireless 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 | $obj = new Type_GenericStacked($CONFIG); | ||
| 10 | $obj->width = $width; | ||
| 11 | $obj->heigth = $heigth; | ||
| 12 | |||
| 13 | switch($obj->args['type']) { | ||
| 14 | case 'signal_noise': | ||
| 15 | $obj->data_sources = array('value'); | ||
| 16 | $obj->colors = array('value' => '0000f0'); | ||
| 17 | $obj->ds_names = array('value' => 'Value'); | ||
| 18 | $obj->rrd_title = 'Signal Noise'; | ||
| 19 | $obj->rrd_vertical = ''; | ||
| 20 | $obj->rrd_format = '%6.1lf'; | ||
| 21 | break; | ||
| 22 | case 'signal_power': | ||
| 23 | $obj->data_sources = array('value'); | ||
| 24 | $obj->colors = array('value' => '0000f0'); | ||
| 25 | $obj->ds_names = array('value' => 'Value'); | ||
| 26 | $obj->rrd_title = 'Signal Power'; | ||
| 27 | $obj->rrd_vertical = ''; | ||
| 28 | $obj->rrd_format = '%6.1lf'; | ||
| 29 | break; | ||
| 30 | case 'signal_quality': | ||
| 31 | $obj->data_sources = array('value'); | ||
| 32 | $obj->colors = array('value' => '0000f0'); | ||
| 33 | $obj->ds_names = array('value' => 'Value'); | ||
| 34 | $obj->rrd_title = 'Signal Quality'; | ||
| 35 | $obj->rrd_vertical = ''; | ||
| 36 | $obj->rrd_format = '%6.1lf'; | ||
| 37 | break; | ||
| 38 | } | ||
| 39 | collectd_flush($obj->identifiers); | ||
| 40 | $obj->rrd_graph(); | ||
| 41 | |||
| 42 | ?> | ||
