From 712eabbe86ccba24a84ce8b23f49dd4ff8bebed9 Mon Sep 17 00:00:00 2001 From: Thomas Harold Date: Sat, 29 Jun 2013 12:50:10 -0400 Subject: plugin: add ipmi plugin --- plugin/ipmi.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 plugin/ipmi.php 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 @@ +ds_names = array( + 'value' => 'Value', +); +switch($obj->args['type']) { + case 'fanspeed': + $obj->rrd_title = sprintf('Fanspeed (%s)', $obj->args['pinstance']); + $obj->rrd_vertical = 'RPM'; + $obj->rrd_format = '%5.1lf'; + break; + case 'temperature': + $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); + $obj->rrd_vertical = 'Celsius'; + $obj->rrd_format = '%5.1lf%s'; + break; + case 'voltage': + $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']); + $obj->rrd_vertical = 'Volt'; + $obj->rrd_format = '%5.1lf'; + break; +} + +collectd_flush($obj->identifiers); +$obj->rrd_graph(); -- cgit v1.1