aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--plugin/hddtemp.php24
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
5require_once 'conf/common.inc.php';
6require_once 'type/Default.class.php';
7require_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
21collectd_flush($obj->identifiers);
22$obj->rrd_graph();
23
24?>