aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/hddtemp.php
diff options
context:
space:
mode:
authorManuel CISSÉ2010-02-23 17:59:10 +0100
committerPim van den Berg2010-03-01 21:06:15 +0100
commitee57a2d084226fd98a63204af2e2d7204e2502d6 (patch)
tree322689374dde5de086fba05fea3aa49f9339a827 /plugin/hddtemp.php
parentadd nut plugin (diff)
downloadapt-panopticon_cgp-ee57a2d084226fd98a63204af2e2d7204e2502d6.zip
apt-panopticon_cgp-ee57a2d084226fd98a63204af2e2d7204e2502d6.tar.gz
apt-panopticon_cgp-ee57a2d084226fd98a63204af2e2d7204e2502d6.tar.bz2
apt-panopticon_cgp-ee57a2d084226fd98a63204af2e2d7204e2502d6.tar.xz
add hddtemp plugin
Diffstat (limited to 'plugin/hddtemp.php')
-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?>