diff options
author | Peter Palfrader <peter@palfrader.org> | 2006-06-13 23:02:14 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2006-06-13 23:02:14 +0000 |
commit | 3c8a865e63b3a58b009e53d0b15dc85c8cc78546 (patch) | |
tree | bfd7d5bc907bbf13d5a79180d1150edca3b330d2 /munin/ipmi_sensor_ | |
parent | fae36a558fbe655538c82db66bfff28eef2f2480 (diff) |
Add watts and amps
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@124 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'munin/ipmi_sensor_')
-rwxr-xr-x | munin/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 |