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!

Versions:
mrtg-2.14.5-2
rrdtool-1.3.7-1.el5.rf
perl-5.8.8-18.el5_3.1
RHEL5
_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg

Reply via email to