aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorConrad Kostecki2013-06-01 00:12:38 +0200
committerConrad Kostecki2013-06-01 00:12:38 +0200
commitffb1e2bcd691fe3d1d3d66836cc2faa8cbcc1b65 (patch)
tree70d801ba650fe712ad737fbab8a12f74a36b385a
parentMerge pull request #8 from mce35/nut (diff)
downloadapt-panopticon_cgp-ffb1e2bcd691fe3d1d3d66836cc2faa8cbcc1b65.zip
apt-panopticon_cgp-ffb1e2bcd691fe3d1d3d66836cc2faa8cbcc1b65.tar.gz
apt-panopticon_cgp-ffb1e2bcd691fe3d1d3d66836cc2faa8cbcc1b65.tar.bz2
apt-panopticon_cgp-ffb1e2bcd691fe3d1d3d66836cc2faa8cbcc1b65.tar.xz
Thermal Plugin added
-rw-r--r--plugin/thermal.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/plugin/thermal.php b/plugin/thermal.php
new file mode 100644
index 0000000..eaef5e8
--- /dev/null
+++ b/plugin/thermal.php
@@ -0,0 +1,26 @@
1<?php
2
3# Collectd Thermal plugin
4
5require_once 'conf/common.inc.php';
6require_once 'type/Default.class.php';
7require_once 'inc/collectd.inc.php';
8
9## LAYOUT
10# thermal-XXXX/
11# thermal-XXXX/gauge.rrd
12
13$obj = new Type_Default($CONFIG);
14$obj->ds_names = array(
15 'value' => 'Value',
16);
17switch($obj->args['type']) {
18 case 'gauge':
19 $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']);
20 $obj->rrd_vertical = '°C';
21 $obj->rrd_format = '%.1lf';
22 break;
23}
24
25collectd_flush($obj->identifiers);
26$obj->rrd_graph();