aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/thermal.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-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();