summaryrefslogtreecommitdiff
path: root/munin/ipmi_sensor_
diff options
context:
space:
mode:
Diffstat (limited to 'munin/ipmi_sensor_')
-rwxr-xr-xmunin/ipmi_sensor_26
1 files changed, 24 insertions, 2 deletions
diff --git a/munin/ipmi_sensor_ b/munin/ipmi_sensor_
index 893fe53..f364fc7 100755
--- a/munin/ipmi_sensor_
+++ b/munin/ipmi_sensor_
@@ -17,7 +17,7 @@
require 'yaml';
-VALID_UNITS = %w{volts degrees_c rpm}
+VALID_UNITS = %w{volts degrees_c rpm amps watts}
CACHEDIR = "/var/lib/munin/plugin-state"
CACHEFILE = "plugin-ipmi_sensor.cache"
@@ -102,7 +102,7 @@ def autoconf
if get_sensor_data.length > 0
puts "yes"
else
- puts "no (no ipmitool output"
+ puts "no (no ipmitool output)"
end
end
def suggest
@@ -156,6 +156,28 @@ def config
n = normalize_sensor(d[:name])
puts "#{n}.label #{d[:name]}"
end
+ when "amps"
+ puts "graph_title IPMI Sensors: Amperes"
+ puts "graph_args --base 1000"
+ puts "graph_vlabel Amperes";
+ puts "graph_category sensors"
+ puts "graph_info This graph shows the amperes as reported by IPMI"
+ get_sensor_data.each do |d|
+ next unless normalize_unit(d[:unit]) == u
+ n = normalize_sensor(d[:name])
+ puts "#{n}.label #{d[:name]}"
+ end
+ when "watts"
+ puts "graph_title IPMI Sensors: Watts"
+ puts "graph_args --base 1000"
+ puts "graph_vlabel Watts";
+ puts "graph_category sensors"
+ puts "graph_info This graph shows the watts as reported by IPMI"
+ get_sensor_data.each do |d|
+ next unless normalize_unit(d[:unit]) == u
+ n = normalize_sensor(d[:name])
+ puts "#{n}.label #{d[:name]}"
+ end
else
bail_out "Do not know how to handle unit '#{u}'"
end