[mrtg] Now Im REALLY confused....

Martin mmacleod at london.edu
Mon Aug 8 15:03:08 MEST 2005


Thanks for the help, sorry for the slow response, spent the weekend reading
up on snmp... ;(
I have completely disabled the firewall and SELinux - just in case
If I run cfgmaker against the wireless AP from my MRTG box, I get lots of
info back which Im taking to mean snmp is working on my MRTG box.

Using getif from a windows box, I can connect to the wireless AP and browse
the mib tree without any problems.
Trying snmpwalk to the AP gives me a snmp timeout - so I thought I would try
it locally

[root at morpheus snmp]# snmpwalk -v1 -c public 163.119.254.76
SNMPv2-MIB::sysDescr.0 = STRING: Linux morpheus.london.edu
2.6.12-1.1398_FC4smp #1 SMP Fri Jul 15 01:05:24 EDT 2005 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (11837874) 1 day, 8:52:58.74
SNMPv2-MIB::sysContact.0 = STRING: Root <root at localhost> (configure
/etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: morpheus.london.edu
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.4 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.5 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.6 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module to describe generic
objects for network interface sub-layers
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing TCP
implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing IP and ICMP
implementations
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing UDP
implementations
SNMPv2-MIB::sysORDescr.6 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.7 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.8 = STRING: The MIB for Message Processing and
Dispatching.
SNMPv2-MIB::sysORDescr.9 = STRING: The management information definitions
for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (3) 0:00:00.03
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (26169491) 3 days,
0:41:34.91
End of MIB

I get no response if I try to walk the tree using our community string (not
public!) So I thought Id check to see how to configure SNMP
Digging around, I had a go at editing /etc/snmp/snmpd.conf - below is a copy
of the bit I edited....

# Here is a commented out example configuration that allows less
# restrictive access.

# YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
# KNOWN AT YOUR SITE.  YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.

##       sec.name  source          community
com2sec local     localhost        nwsupport
com2sec mynetwork 163.119.0.0/24     nwsupport

##     group.name sec.model  sec.name
group MyRWGroup  any        local
group MyROGroup  any        mynetwork
#
group MyRWGroup  any        otherv3user
#...

##           incl/excl subtree                          mask
view all    included  .1                               80

## -or just the mib2 tree-

#view mib2   included  .iso.org.dod.internet.mgmt.mib-2 fc


##                context sec.model sec.level prefix read   write  notif
access MyROGroup ""      any       noauth    0      all    none   none
access MyRWGroup ""      any       noauth    0      all    all    all


Hurrah - getting somewhere at last...

snmpwalk -v1 -c nwsupport 163.119.174.205 1.3.6.1.2.1
snmpwalk -v 2c -c nwsupport 163.119.174.205 1.3.6.1.2.1
snmpwalk -v3 -c nwsupport 163.119.174.205 1.3.6.1.2.1 - all give me long
strings of output..... BUT....

[root at morpheus config]# snmpwalk -v 2c -c nwsupport 163.119.174.205
1.3.6.1.2.1.25.1.5
HOST-RESOURCES-MIB::host = No Such Object available on this agent at this
OID 

But using getif I can walk this string to hrSystemNumUsers
(.1.3.6.1.2.1.25.1.5)
Using snmpwalk I can get as far as .1.3.6.1.2.1 - I have to remove the
.25.1.5 at the end before I lose the error messages
Tried running MRTG (just in case!) - same error as before - see 2 mails down
for detail...

Really confused now, and any pointers would be very gratefully received...

Many thanks

Sorry it is a bit long, but I was trying to put in the steps as I did
them....




-----Original Message-----
From: Koelstra, J. (Jan) [mailto:JKoelstra at MINSZW.NL] 
Sent: 04 August 2005 15:45
To: Martin Macleod-Brown; mrtg at list.ee.ethz.ch
Subject: RE: [mrtg] Re: SNMP gettng there



Martin,

In this case more errors is a change for the better.
With the $ signs you had errors inside the config file and MRTG would not
even run. The new errors tell you that the config errors are gone. MRTG
starts working and finds out there is something wrong with the SNMP
communication between your MRTG host and the target machine. There can be
several reasons for this: 1. The both machines are located in separate parts
of the network where SNMP traffic can not get through. Make sure UDP port
161 is not blocked. 2. SNMP is not running or not properly configured at the
target host. 3. You don't use the right community string in your mrtg config
file. 4. The oid you use in your config file is not valid or not supported
at the target machine. 5... To resolve problems with SNMP you best use a
mibbrowser from the box where MRTG is installed. If you have mrtg set up on
a unix box you can use snmpwalk, if mrtg is on a Windows box getif is a
usefull mibbrowser.

Hth,

Jan.


-----Original Message-----
From: Martin Macleod-Brown [mailto:mmacleod at london.edu]

Sent: Thursday, August 04, 2005 4:13 PM
To: Koelstra, J. (Jan); mrtg at list.ee.ethz.ch
Subject: RE: [mrtg] Re: SNMP gettng there


Thanks for the suggestion.
Target is at the beginning of the line, just my error in formatting
(sorry!).... If I remove the $ I get even more error messages....

SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 1 (OID: 1.3.6.1.2.1.25.1.5)
SNMPv1_Session (remote host: "163.119.174.205" [163.119.174.205].161)
                  community: "admin"
                 request ID: 1586531513
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/bin/../lib64/mrtg2/SNMP_util.pm line 490
SNMPGET Problem for 1.3.6.1.2.1.25.1.5 1.3.6.1.2.1.25.1.5 sysUptime sysName
on admin at 163.119.174.205::::::v4only  at /usr/bin/mrtg line 1851
ERROR: Target[163.119.174.205][_IN_] ' $target->[0]{$mode} ' did not eval
into defined data
ERROR: Target[163.119.174.205][_OUT_] ' $target->[0]{$mode} ' did not eval
into defined data

And putting the $ back takes back to just the original 2 lines of
errors.....


-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch] On
Behalf Of Koelstra, J. (Jan)
Sent: 04 August 2005 14:03
To: Martin Macleod-Brown; mrtg at list.ee.ethz.ch
Subject: [mrtg] Re: SNMP gettng there



Martin,

My bet is that you have to remove the $ signs from your targetline. Also
make sure "Target" is at the beginning of the line. In your message below it
continues from at the "Workdir" line.

Hth,

Jan.

-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch] On
Behalf Of Martin Macleod-Brown
Sent: Thursday, August 04, 2005 2:54 PM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] SNMP gettng there


Thank you for all those people that replied to yesterdays post ;) I can
defintely confirm that the OID sting is right, confirmed with getif doing an
smnpwalk. Running the cofig file below gives me the following errors at the
bottom....

WorkDir: /var/www/html/mrtg/wireless
Target[163.119.174.205]:1.3.6.1.2.1.25.1.5&1.3.6.1.2.1.25.1.5:$admin@$163.11
9.174.205
MaxBytes[163.119.174.205]: 100
kMG[163.119.174.205]: ,M,,,
Options[163.119.174.205]: gauge, nopercent, absolute, unknaszero
YLegend[163.119.174.205]: Users Attached
ShortLegend[163.119.174.205]: Users Attached
WithPeak[163.119.174.205]: wmy
Colours[163.119.174.205]: GREEN#00eb0c,BLUE#0000ff,GRAY#AAAAAA,VIOLET#ff00ff
Legend1[163.119.174.205]: Number of Users Attached
Legend2[163.119.174.205]: .
Legend3[163.119.174.205]: Peak Number of Users Attached
Legend4[163.119.174.205]: .
LegendI[163.119.174.205]: Users:
LegendO[163.119.174.205]: .
Title[163.119.174.205]: $SNAP-WAT1-T3
PageTop[163.119.174.205]: <H1>SNAP-WAT1-T3</H1>
Directory[163.119.174.205]: wat1-t3

Error.....

ERROR: Target[163.119.174.205][_IN_]
'1.3.6.1.2.1.25.1.5&1.3.6.1.2.1.25.1.5:$admin@$163.119.174.205' (warn):
(Missing operator before ?)
ERROR: Target[163.119.174.205][_OUT_]
'1.3.6.1.2.1.25.1.5&1.3.6.1.2.1.25.1.5:$admin@$163.119.174.205' (warn):
(Missing operator before ?)

Am I right in thinking that this is to do with the mrtg file rather than
this config script?  What does the missing operator message mean, there is
no ? In the config file, can anyone help me by pointing me in the right
direction please??

Many thanks

Martin

Information Systems Division
London Business School, Sussex Place, Regents Park, London. NW1 4SA
t: +44 (0)20 7000 7772 direct
+44 (0)20 7262 5050 general
fax: +44 (0)20 7000 7771 direct
+44 (0)20 7724 7875 general
e: mailto:mmacleod at london.edu      http://www.london.edu/technology/


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi


_________________________________________________________

Het ministerie van Sociale Zaken en Werkgelegenheid sluit elke
aansprakelijkheid uit in verband met het niet juist, onvolledig of niet
tijdig overkomen van de informatie in deze e-mail. Aan dit bericht kunnen
geen rechten worden ontleend.

Dit bericht is alleen bestemd voor de geadresseerde. Indien dit bericht niet
voor u bestemd is, verzoeken wij u dit onmiddellijk aan ons te melden en de
inhoud van dit bericht te vernietigen.
_________________________________________________________

The ministry of Social Affairs and Employment is not liable for any
incorrect or incomplete transmission of the information in this e-mail or
for any delay in its receipt. This message shall not constitute any
obligations.

This message is intended solely for the addressee.
If you have received this message in error, please inform us immediately and
delete its content.
_________________________________________________________

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi


______________________________________________________________________

This email has been scanned by the MessageLabs Email Security System on
behalf of the London Business School community. For more information please
visit http://www.messagelabs.com/email
______________________________________________________________________


_________________________________________________________

Het ministerie van Sociale Zaken en Werkgelegenheid sluit elke
aansprakelijkheid uit in verband met het niet juist, onvolledig of niet
tijdig overkomen van de informatie in deze e-mail. Aan dit bericht kunnen
geen rechten worden ontleend.

Dit bericht is alleen bestemd voor de geadresseerde. Indien dit bericht niet
voor u bestemd is, verzoeken wij u dit onmiddellijk aan ons te melden en de
inhoud van dit bericht te vernietigen.
_________________________________________________________

The ministry of Social Affairs and Employment is not liable for any
incorrect or incomplete transmission of the information in this e-mail or
for any delay in its receipt. This message shall not constitute any
obligations.

This message is intended solely for the addressee.
If you have received this message in error, please inform us immediately and
delete its content.
_________________________________________________________

______________________________________________________________________

This email has been scanned by the MessageLabs Email Security System on
behalf of the London Business School community. For more information please
visit http://www.messagelabs.com/email
______________________________________________________________________

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the mrtg mailing list