diff options
| author | Tom Gallacher | 2010-07-19 22:05:23 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2010-07-19 22:51:25 +0200 |
| commit | 6150a1ab9b087378af0d674226a9f9929401aa0c (patch) | |
| tree | 89d7155d0b68341d594a6689cfbb000fd198b16e | |
| parent | default graph time range is now configurable (not only for uptime) (diff) | |
| download | apt-panopticon_cgp-6150a1ab9b087378af0d674226a9f9929401aa0c.zip apt-panopticon_cgp-6150a1ab9b087378af0d674226a9f9929401aa0c.tar.gz apt-panopticon_cgp-6150a1ab9b087378af0d674226a9f9929401aa0c.tar.bz2 apt-panopticon_cgp-6150a1ab9b087378af0d674226a9f9929401aa0c.tar.xz | |
plugin: add wireless plugin
Signed-off-by: Pim van den Berg <pim@nethuis.nl>
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 | ?> | ||
