summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmunin/ipmi_sensor_12
1 files changed, 9 insertions, 3 deletions
diff --git a/munin/ipmi_sensor_ b/munin/ipmi_sensor_
index a56994e..90f7315 100755
--- a/munin/ipmi_sensor_
+++ b/munin/ipmi_sensor_
@@ -98,12 +98,12 @@ def get_sensor_data
out.each do |line|
line.strip!
# cpu1.vtt-s3 | 1.200 | Volts | ok | na | 1.080 | na | na | 1.320 | na
- # CPU0 IERR | 0x0 | discrete | 0x0100| na | na | na | na | na | na········
+ # CPU0 IERR | 0x0 | discrete | 0x0100| na | na | na | na | na | na
items = line.split(/\s*\|\s*/)
unless items.size == 10
bail_out "Got weird number of fields in ipmitool output. Expected 10 but got #{items.size} for line '#{line}'."
end
- (name, value, unit, status, lower_non_recov, lower_crit, lower_non_crit, upper_non_crit, upper_crit, upper_non_recv) = items
+ (name, value, unit, status, lower_non_recov, lower_crit, lower_non_crit, upper_non_crit, upper_crit, upper_non_recov) = items
nname = normalize_sensor name;
if names.has_key?(nname)
bail_out "Sensor name #{name} (normalized to #{nname}) appears more than once in ipmitool output."
@@ -119,7 +119,7 @@ def get_sensor_data
:lower_non_crit => lower_non_crit,
:upper_non_crit => upper_non_crit,
:upper_crit => upper_crit,
- :upper_non_recv => upper_non_recv,
+ :upper_non_recov => upper_non_recov,
:line => line
}
end
@@ -163,6 +163,8 @@ def config
next unless normalize_unit(d[:unit]) == u
n = normalize_sensor(d[:name])
puts "#{n}.label #{d[:name]}"
+ puts "#{n}.warning #{d[:lower_non_crit]}:#{d[:upper_non_crit]}"
+ puts "#{n}.critical #{d[:lower_non_recov]}:#{d[:upper_non_recov]}"
end
when "degrees_c"
puts "graph_title IPMI Sensors: Temperature"
@@ -174,6 +176,8 @@ def config
next unless normalize_unit(d[:unit]) == u
n = normalize_sensor(d[:name])
puts "#{n}.label #{d[:name]}"
+ puts "#{n}.warning #{d[:lower_non_crit]}:#{d[:upper_non_crit]}"
+ puts "#{n}.critical #{d[:lower_non_recov]}:#{d[:upper_non_recov]}"
end
when "rpm"
puts "graph_title IPMI Sensors: RPMs"
@@ -185,6 +189,8 @@ def config
next unless normalize_unit(d[:unit]) == u
n = normalize_sensor(d[:name])
puts "#{n}.label #{d[:name]}"
+ # no warning, only critical puts "#{n}.warning #{d[:lower_non_crit]}:#{d[:upper_non_crit]}"
+ puts "#{n}.critical #{d[:lower_non_recov]}:#{d[:upper_non_recov]}"
end
when "amps"
puts "graph_title IPMI Sensors: Amperes"