lost and found ( for me ? )

Ubuntu12.04 : net-snmp how to allow SNMP clients to retrieve all OIDs



# tail -1 /etc/lsb-release ;uname -ri
DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"
3.2.0-56-generic x86_64

install snmpd, snmp client
# apt-get install snmp snmpd

# dpkg -l snmpd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  snmpd          5.4.3~dfsg-2.4 SNMP (Simple Network Management Protocol) ag

edit /etc/snmp/snmpd.conf
view all included .1 80
rocommunity public  default    -V all

restart snmpd
# service snmpd restart

run snmpbulkwalk to confirm you could collect all OIDs info.
# snmpbulkwalk -v 2c -c public 127.0.0.1 .1 -On  | head -10
.1.3.6.1.2.1.1.1.0 = STRING: "Linux ans1.localdomain 3.2.0-56-generic #86-Ubuntu SMP Wed Oct 23 09:20:45 UTC 2013 x86_64"
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.8072.3.2.10
.1.3.6.1.2.1.1.3.0 = Timeticks: (1818) 0:00:18.18
.1.3.6.1.2.1.1.4.0 = STRING: "Me <me@example.org>"
.1.3.6.1.2.1.1.5.0 = STRING: "ans1.localdomain"
.1.3.6.1.2.1.1.6.0 = STRING: "Sitting on the Dock of the Bay"
.1.3.6.1.2.1.1.7.0 = INTEGER: 72
.1.3.6.1.2.1.1.8.0 = Timeticks: (0) 0:00:00.00
.1.3.6.1.2.1.1.9.1.2.1 = OID: .1.3.6.1.6.3.10.3.1.1

to install SNMP MIB files, install snmp-mibs-downloader via apt-get.
# apt-get install snmp-mibs-downloader

download MIB files.
# download-mibs

# snmpbulkwalk -v 2c -c public 127.0.0.1 .1 . -m ALL | head -10
SNMPv2-MIB::sysDescr.0 = STRING: Linux ans1.localdomain 3.2.0-56-generic #86-Ubuntu SMP Wed Oct 23 09:20:45 UTC 2013 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-TC::linux
DISMAN-EXPRESSION-MIB::sysUpTimeInstance = Timeticks: (48594) 0:08:05.94
SNMPv2-MIB::sysContact.0 = STRING: Me <me@example.org>
SNMPv2-MIB::sysName.0 = STRING: ans1.localdomain
SNMPv2-MIB::sysLocation.0 = STRING: Sitting on the Dock of the Bay
SNMPv2-MIB::sysServices.0 = INTEGER: 72
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.