aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--plugin/ipmi.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/plugin/ipmi.php b/plugin/ipmi.php
new file mode 100644
index 0000000..e06e4ad
--- /dev/null
+++ b/plugin/ipmi.php
@@ -0,0 +1,45 @@
1<?php
2
3# Collectd Sensors plugin
4
5require_once 'conf/common.inc.php';
6require_once 'type/Default.class.php';
7require_once 'inc/collectd.inc.php';
8
9## LAYOUT (similar to sensors plugin)
10#
11# collectd, by default, creates the ipmi RRDs in the following pattern:
12# /(basedir)/(hostname)/ipmi/(type)-(instance).rrd
13#
14# Instances for IPMI usually have spaces in the filename, such as:
15#
16# temperature-System Temp system_board (7.1).rrd
17# voltage-+1.1 V system_board (7.1).rrd
18# voltage--12 V system_board (7.1).rrd
19# voltage-+12 V system_board (7.1).rrd
20# voltage-VBAT system_board (7.1).rrd
21
22$obj = new Type_Default($CONFIG);
23$obj->ds_names = array(
24 'value' => 'Value',
25);
26switch($obj->args['type']) {
27 case 'fanspeed':
28 $obj->rrd_title = sprintf('Fanspeed (%s)', $obj->args['pinstance']);
29 $obj->rrd_vertical = 'RPM';
30 $obj->rrd_format = '%5.1lf';
31 break;
32 case 'temperature':
33 $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']);
34 $obj->rrd_vertical = 'Celsius';
35 $obj->rrd_format = '%5.1lf%s';
36 break;
37 case 'voltage':
38 $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']);
39 $obj->rrd_vertical = 'Volt';
40 $obj->rrd_format = '%5.1lf';
41 break;
42}
43
44collectd_flush($obj->identifiers);
45$obj->rrd_graph();