Main Page | Report this Page
 
Computers Forum Index  »  Computer - DCOM - Net Management  »  MRTG Conversion Code...
Page 1 of 1    

MRTG Conversion Code...

Author Message
Azamat...
Posted: Thu Jun 18, 2009 1:32 am
Guest
Hi,
I have this conversion code that strips the temperature from the
string like this.
SNMPv2-SMI::enterprises.789.1.21.1.2.1.25.1 = STRING: "23C (73F)
ambient, 32C (89F), 32C (89F)"

the conversion code

# Conversion Code
sub String2Temp {
my $str = shift;
$str =~ /\((\d+)F\)(.*)ambient.*/i;
my $temp = $1;
return $temp;
}


this works fine on my old montoring host, I'm tring to migrate to a
new host and now I get this error

ERROR: File /etc/mrtg/TempConv.pl conversion code evaluation failed
syntax error at (eval 17) line 1, at EOF


Does anyone know what could be the issue? it's the exact same code, I
can't figure it out ...

many thanks.
 
 
Page 1 of 1    
All times are GMT
The time now is Sun Nov 22, 2009 1:49 am