Package: munin-node
Version: 1.2.5-1

for the exact right length of sensors name there's no spaces following the 
colon... for example:

% sensors |grep Temp
CPU2_Temp:+39.25 C  (low  =    +0 C, high =   +90 C)
CPU1_Temp:+42.00 C  (low  =    +0 C, high =   +90 C)

i fixed all three regex even though i'm only hitting it on the 
temperatures.

-dean


--- /usr/share/munin/plugins/sensors_.orig      2006-11-11 01:23:08.000000000 
-0800
+++ /usr/share/munin/plugins/sensors_   2006-11-11 01:27:40.000000000 -0800
@@ -64,21 +64,21 @@
 my $SENSORS = $ENV{'sensors'} || 'sensors';
 my %config = (
               fan => {
-                        regex => qr/^(\S[^:]*)\s*:\s+\+?(\d+) RPM.*?(\d+) 
RPM/m,
+                        regex => qr/^(\S[^:]*)\s*:\s*\+?(\d+) RPM.*?(\d+) 
RPM/m,
                         title => 'Fans',
                         vtitle => 'RPM',
                         print_threshold => \&fan_threshold,
                         graph_args => '--base 1000 -l 0'
                       },
               temp => {
-                        regex => qr/^(\S[^:]*)\s*:\s+\+?(\d+(?:\.\d+)?)[° 
]C(?:\s+\((?:high|limit)\s*=\s*\+?(\d+(?:\.\d+)?)[° 
]C,\s*hyst(?:eresis)?\s*=\s*\+?(\d+(?:\.\d+)?)[° ]C\))?/m,
+                        regex => qr/^(\S[^:]*)\s*:\s*\+?(\d+(?:\.\d+)?)[° 
]C(?:\s+\((?:high|limit)\s*=\s*\+?(\d+(?:\.\d+)?)[° 
]C,\s*hyst(?:eresis)?\s*=\s*\+?(\d+(?:\.\d+)?)[° ]C\))?/m,
                         title => 'Temperatures',
                         vtitle => 'Celsius',
                         print_threshold => \&temp_threshold,
                         graph_args => '--base 1000 -l 0'
                       },
               volt => {
-                        regex => qr/^(\S[^:]*)\s*:\s+\+?(-?\d+(?:\.\d+)?) 
V(?:\s+\(min\s*=\s*\+?(-?\d+(?:\.\d+)?) V,\s*max\s*=\s*\+?(-?\d+(?:\.\d+)?) 
V\))/m,
+                        regex => qr/^(\S[^:]*)\s*:\s*\+?(-?\d+(?:\.\d+)?) 
V(?:\s+\(min\s*=\s*\+?(-?\d+(?:\.\d+)?) V,\s*max\s*=\s*\+?(-?\d+(?:\.\d+)?) 
V\))/m,
                         title => 'Voltages',
                         vtitle => 'Volt',
                         print_threshold => \&volt_threshold,

Reply via email to