diff options
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/hddtemp.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugin/hddtemp.php b/plugin/hddtemp.php new file mode 100644 index 0000000..ff073cb --- /dev/null +++ b/plugin/hddtemp.php | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd HDDTemp 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 | # hddtemp/temperature-<disk>.rrd | ||
| 11 | |||
| 12 | $obj = new Type_Default($CONFIG); | ||
| 13 | $obj->ds_names = array('temperature' => 'Temperature'); | ||
| 14 | $obj->width = $width; | ||
| 15 | $obj->heigth = $heigth; | ||
| 16 | $obj->generate_colors(); | ||
| 17 | $obj->rrd_title = 'HDD Temperature'; | ||
| 18 | $obj->rrd_vertical = '°C'; | ||
| 19 | $obj->rrd_format = '%.1lf'; | ||
| 20 | |||
| 21 | collectd_flush($obj->identifiers); | ||
| 22 | $obj->rrd_graph(); | ||
| 23 | |||
| 24 | ?> | ||
