summaryrefslogtreecommitdiff
path: root/munin
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-11-12 02:15:47 +0000
committerroot <root@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2006-11-12 02:15:47 +0000
commit8b1510f6f068796dbe0854e823bbbfa1c187094d (patch)
treea55c31d65a328845bbcc59c2c1786d25d9a6944b /munin
parent5ed2a6cc1b5b4976da0747866ed1c051dfa263c8 (diff)
Convey limits from IPMI to munin, from "S. Wefel" <wefel@unixos.de>
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@242 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'munin')
-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"