[mrtg] OID's missing or adjusted after changing hardware

Troy Wical troy at wical.com
Sun Nov 16 15:07:01 CET 2008


It seems now that I have spoken too soon.  I still receive the errors  
related to what I spoke of in the beginning of the thread, so I  
thought I would dump the MIB and go with the OID instead.  An snmp  
walk on the OID shows that all is well...

#host:/home/user# snmpwalk -v 2c -c [removed] localhost  
1.3.6.1.4.1.2021.11.52
#UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 77345

Everything should be good to go right?  But I get the following when I  
run mrtg...

#host:/home/user# env LANG=C mrtg /etc/mrtg/mrtg_host.cfg
#SNMP Error:
#Received SNMP response with error code
# error status: noSuchName
#  index 2 (OID: 1.3.6.1.4.1.2021.11.52)
#SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
#                 community: "[removed]"
#                request ID: 1384270811
#                PDU bufsize: 8000 bytes
#                    timeout: 2s
#                    retries: 5
#                    backoff: 1)
# at /usr/share/perl5/SNMP_util.pm line 490
#SNMPGET Problem for ssCpuRawUser.0 1.3.6.1.4.1.2021.11.52 sysUptime  
sysName on [removed]@localhost::::::v4only
# at /usr/bin/mrtg line 2043
#2008-11-16 06:56:54: ERROR: Target[host.cpu][_IN_] ' $target->[1] 
{$mode} ' did not eval into defined data
#2008-11-16 06:56:54: ERROR: Target[host.cpu][_OUT_] ' $target->[1] 
{$mode} ' did not eval into defined data

Anymore thoughts?  I am able to snmpwalk both the MIB and the OID, so  
I am not sure why this won't work. As always, appreciate the help.

Troy

On Nov 15, 2008, at 11:06 PM, Troy Wical wrote:

> Steve, thanks for the comments.  They got me back on track and all is
> working well now.
>
> Although they are small items, here are some items I ran across, for
> future searches:
>
> -debian snmp loads all mibs automagically under /usr/share/snmp/mibs/
> -below is what was in my cfg file, and is what caused my problems:
>
> "LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/
> TCP-MIB.txt "
>
> Obviously there was a problem with how the two were spaced with
> the ,   So I seperated them out, making this folowing:
>
> LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
> LoadMIBs: /usr/share/snmp/mibs/TCP-MIB.txt
>
> All fixed now :)
>
> Thanks again for the pointers!
>
> Peace, Troy
>
> On Nov 15, 2008, at 11:07 AM, Steve Shipway wrote:
>
>> The problem is not that the new machine does not have the OIDs in
>> the SNMP, but that your MRTG seems no longer to be able to resolve
>> the symbolic names (ssCpuRawUser, etc) into numerical OIDs.  I am
>> guessing that you are missing the MIB files, or need to load them
>> into MRTG with the LoadMib directive?
>>
>> You have two options -
>>
>> 1) Use numerical OIDs instead of the symbolic names
>> 2) Install the MIBs on your machine and load them into MRTG.
>>
>> You may already have the required MIBs (likely) but not have them
>> loaded by the SNMP client by default.  In this case, either set them
>> to load by default (see the snmp.conf) or tell MRTG to load them
>> (use LoadMibs: in the configuration files)
>>
>> Steve
>>
>> ________________________________________
>> From: mrtg-bounces at lists.oetiker.ch [mrtg-bounces at lists.oetiker.ch]
>> On Behalf Of Troy Wical [troy at wical.com]
>> Sent: Sunday, 16 November 2008 4:20 a.m.
>> To: mrtg at lists.oetiker.ch
>> Subject: [mrtg] OID's missing or adjusted after changing hardware
>>
>> NET-SNMP version:  5.2.3
>> Linux 2.6.24-etchnhalf.1-686
>>
>> I recently changed to a new machine and am having issues getting mrtg
>> back up and running.  The two hosts had the exact same kernel
>> installed.  However, the CPU and memory are significantly newer on
>> this host that I have moved to.  The MIB's that I was using on the  
>> old
>> host simply don't exist on the new one, and I can't find similar ones
>> on the new host that would seem likely candidates to replace the old
>> ones.
>>
>> Here is an example of what I was using on the old host:
>>
>> Target[host.cpu]: ssCpuRawUser.0&ssCpuRawIdle.0:[removed]@localhost
>> RouterUptime[host.cpu]: [removed]@localhost
>> MaxBytes[host.cpu]: 100
>> Title[host.cpu]: User and Idle CPU usage
>> PageTop[host.cpu]: <H1>User and CPU Load</H1>
>> ShortLegend[host.cpu]: %
>> YLegend[host.cpu]: CPU Usage
>> Legend1[host.cpu]: User CPU in % (Load)
>> Legend2[host.cpu]: Idle CPU in % (Load)
>> LegendI[host.cpu]: User
>> LegendO[host.cpu]: Idle
>> Options[host.cpu]: growright,nopercent
>> Unscaled[host.cpu]: ymwd
>>
>> The 'ssCpuRawUser' and 'ssCpuRawIdle' simply don't exist on the new
>> host when I snmpwalk it.  And there seems to be nothing related.   
>> Here
>> is the same config with two examples of MIB's I pulled from the new
>> host.  I ran these just to see if they would work, even though I knew
>> that would not be related to User and Idle cpu load....
>>
>> Target[host.cpu]: hrSystemInitialLoadDevice.0&hrSystemProcesses.0:
>> [removed]@localhost
>> RouterUptime[host.cpu]: [removed]@localhost
>> MaxBytes[host.cpu]: 100
>> Title[host.cpu]: User and Idle CPU usage
>> PageTop[host.cpu]: <H1>User and CPU Load</H1>
>> ShortLegend[host.cpu]: %
>> YLegend[host.cpu]: CPU Usage
>> Legend1[host.cpu]: User CPU in % (Load)
>> Legend2[host.cpu]: Idle CPU in % (Load)
>> LegendI[host.cpu]: User
>> LegendO[host.cpu]: Idle
>> Options[host.cpu]: growright,nopercent
>> Unscaled[host.cpu]: ymwd
>>
>> Here are the errors I get when I try to run the new config....
>>
>> Unknown SNMP var hrSystemInitialLoadDevice.0
>> at /usr/bin/mrtg line 2043
>> Unknown SNMP var hrSystemProcesses.0
>> at /usr/bin/mrtg line 2043
>> 2008-11-15 08:17:54: WARNING: Expected a number but got '4:17:16'
>> 2008-11-15 08:17:54: WARNING: Expected a number but got 'host'
>> 2008-11-15 08:17:55: ERROR: Target[host.cpu][_IN_] ' $target->[1]
>> {$mode} ' did not eval into defined data
>> 2008-11-15 08:17:55: ERROR: Target[host.cpu][_OUT_] ' $target->[1]
>> {$mode} ' did not eval into defined data
>>
>> Thanks in advance for any help.  Search engines have defied me on  
>> this
>> one.
>>
>> Peace, Troy
>>
>> _______________________________________________
>> mrtg mailing list
>> mrtg at lists.oetiker.ch
>> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
>
> _______________________________________________
> mrtg mailing list
> mrtg at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg



More information about the mrtg mailing list