[mrtg] MRTG Conversion Code
Yang Xiao
yxiao2004 at gmail.com
Thu Jun 18 04:40:12 CEST 2009
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
-------------- 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