CentOS 7 and MRTG - errors - and fixes

SupermanInNY

Verified User
Joined
Sep 28, 2004
Messages
419
Hi All,

I've just installed MRTG using UpdateScript and after some time I noticed a lot of emails with errors in them.

If you get error messages in emails:


MRTG error through CRON :: “Subroutine SNMP_Session::pack_sockaddr_in6 redefined”
Or something like:

Subroutine SNMPv1_Session::AF_INET6 redefined at /usr/lib/perl5/5.8.8/Exporter.pm line 65.
at /usr/bin/../lib64/mrtg2/SNMP_Session.pm line 594
Subroutine main::AF_INET6 redefined at /usr/lib/perl5/5.8.8/Exporter.pm line 65.
at /usr/bin/mrtg line 97

or similar text related to SNMP_Sessions and INET6 then try to follow the solution I found here:

I followed the instructions in the following post: http://penguinbliss.com/?p=239 and it indeed removed the errors.

vi /usr/local/mrtg-2/bin/mrtg <-- one line change.
vi /usr/local/mrtg-2/lib/mrtg2/SNMP_Session.pm <-- two line changes.

I still get different errors.



2018-05-03 16:20:01: WARNING: Problem with External get '/var/www/html/mrtg/core/system memory':
Expected a Number for 'in' but got ''

2018-05-03 16:20:01: WARNING: Problem with External get '/var/www/html/mrtg/core/system memory':
Expected a Number for 'out' but got ''

2018-05-03 16:20:01: ERROR: Target[memory][_IN_] ' $target->[8]{$mode} ' did not eval into defined data
2018-05-03 16:20:01: ERROR: Target[memory][_OUT_] ' $target->[8]{$mode} ' did not eval into defined data


But, thought to first publish the immediate first solution for the first error messages.
 
Back
Top