diff options
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(); | ||
