From 3c8a865e63b3a58b009e53d0b15dc85c8cc78546 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 13 Jun 2006 23:02:14 +0000 Subject: Add watts and amps git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@124 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- munin/ipmi_sensor_ | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'munin/ipmi_sensor_') 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 -- cgit v1.2.3