[mrtg] Problem loading MIB file, Unknown SNMP var

Daniel McDonald dan.mcdonald at austinenergy.com
Thu Oct 7 21:23:52 CEST 2010


On 10/6/10 4:30 PM, "Fred Weston" <mrtg-list at fredweston.net> wrote:

> I'm trying to use MRTG to graph the number of active DS0 channels on my Cisco
> voice gateway.  I've downloaded the CISCO-POP-MGMT-MIB MIB file from Cisco and
> added it to my mrtg.cfg file, however when I try to access objects by name,
> MRTG complains that the names are invalid:
> 
> Unknown SNMP var cpmActiveDS0s
>  at /usr/bin/mrtg line 2207
> Unknown SNMP var cpmActiveDS0s
>  at /usr/bin/mrtg line 2207
> 2010-10-06 17:15:56: ERROR: Target[vgtest][_IN_] ' $target->[0]{$mode} ' did
> not eval into defined data
> 2010-10-06 17:15:56: ERROR: Target[vgtest][_OUT_] ' $target->[0]{$mode} ' did
> not eval into defined data

Twice in one week!  LoadMibs does not follow IMPORT clauses - you need to
load the mibs from the IMPORT statements first.

If you o get it working, I'd love to see it.  I've been using the CnTWaLK
feature.  Here is my template:

# First see if there are VOIP interfaces:
my %iftype;

if ($$router_opt{'interfaces'}) {
   foreach my $ifindex (sort {int($a) <=> int($b)} keys %$router_ref) {
        next unless $ifindex =~ /^\d+$/;
             my $i = $$router_ref{$ifindex};
             my $if_type = $$i{ifType};
             ++$iftype{$if_type};
        }
}
if ($iftype{81} +$iftype{102} > 0) {
   my $maxcalls = $iftype{81}+$iftype{102};
   my $target_name = $router_name.".call";
   $head_lines .= <<CALLS
#.....................................................................
# Voip Concurrent Calls
#

Target[$target_name]:
CnTWaLKcvCommonDcCallActiveCoderTypeRate&PseudoZero:public:$router
SnmpOptions[$target_name]: $v3options
MaxBytes[$target_name]: $maxcalls
routers.cgi*ShortDesc[$target_name]:  Calls
bb*host[$target_name]: $router_name
bb*svc[$target_name]: call
routers.cgi*Graph[$target_name]: ALL_CALLS
bb*red[$target_name]: 90%
bb*yellow[$target_name]: 70%
Options[$target_name]:  gauge, noo
Directory[$target_name]: $directory_name
WithPeak[$target_name]: wmy
YLegend[$target_name]: calls
ShortLegend[$target_name]: calls
Legend1[$target_name]: calls
LegendI[$target_name]:  calls :
Title[$target_name]: $sysname
PageTop[$target_name]: <H1>$sysname Concurrent Calls</H1>
 <TABLE>
   <TR><TD>System:</TD><TD>$sysname  </TD></TR>
   <TR><TD>Location:</TD><TD>$syslocation </TD></TR>
 </TABLE>
CALLS
; 
}

-- 
Daniel J McDonald, CCIE # 2495, CISSP # 78281



More information about the mrtg mailing list