[mrtg] MRTG Conversion Code

Yang Xiao yxiao2004 at gmail.com
Thu Jun 18 04:40:12 CEST 2009

I have this conversion code that strips the temperature from the
string like this.
SNMPv2-SMI::enterprises.789. = 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!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20090617/cf0e3b24/attachment.html 

More information about the mrtg mailing list