diff options
| author | Manuel CISSÉ | 2013-04-04 09:32:13 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2013-04-06 11:09:56 +0200 |
| commit | 23e3ba65972d6dd5bc9ada59bb78aaacb76f4586 (patch) | |
| tree | 0107f1afe602a940947a3ce32047e2be7d2c9daa /plugin | |
| parent | rewrite some code of added overview_filter feature (diff) | |
| download | apt-panopticon_cgp-23e3ba65972d6dd5bc9ada59bb78aaacb76f4586.zip apt-panopticon_cgp-23e3ba65972d6dd5bc9ada59bb78aaacb76f4586.tar.gz apt-panopticon_cgp-23e3ba65972d6dd5bc9ada59bb78aaacb76f4586.tar.bz2 apt-panopticon_cgp-23e3ba65972d6dd5bc9ada59bb78aaacb76f4586.tar.xz | |
plugin: Add MD plugin
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/md.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugin/md.php b/plugin/md.php new file mode 100644 index 0000000..abbf963 --- /dev/null +++ b/plugin/md.php | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd MD 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 | # md-XXXX/ | ||
| 11 | # md-XXXX/md_disks-XXXX.rrd | ||
| 12 | |||
| 13 | $obj = new Type_Default($CONFIG); | ||
| 14 | $obj->ds_names = array( | ||
| 15 | 'value' => 'Value', | ||
| 16 | ); | ||
| 17 | $obj->width = $width; | ||
| 18 | $obj->heigth = $heigth; | ||
| 19 | $obj->rrd_title = sprintf('Disks (md-%s)', $obj->args['pinstance']); | ||
| 20 | $obj->rrd_vertical = '#'; | ||
| 21 | $obj->rrd_format = '%2.0lf'; | ||
| 22 | |||
| 23 | collectd_flush($obj->identifiers); | ||
| 24 | $obj->rrd_graph(); | ||
