Web Hosting Talk







View Full Version : SNMP and MRTG... almost giving up


dektong
02-05-2002, 03:28 AM
Urgh ... Following this (http://net-snmp.sourceforge.net/#Documentation), I installed SNMP 4.2.3 ... and now (After quite a few hoursss) I am in the point where I am almost giving up ... SNMP has been installed and I can run snmpd fine ... But when I try to use SNMP in my MRTG, I keep getting errors (I think it's snmpget).

When I did /usr/local/mrtg-2/bin/cfgmaker public@localhost > localhost.cfg, I got the following output/errors (some has been taken out to make this shorter):


--base: Get Device Info on public@localhost:
--base: Vendor Id:
--base: Populating confcache
--snpo: Skipping ifName scanning because public@localhost: does not seem to support it
--snpo: Skipping ifDescr scanning because public@localhost: does not seem to support it
--snpo: Skipping ipAdEntIfIndex scanning because public@localhost: does not seem to support it
--snpo: Skipping ifType scanning because public@localhost: does not seem to support it
--snpo: Skipping ifPhysAddress scanning because public@localhost: does not seem to support it
--base: Get Interface Info
--base: Walking ifIndex
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.2.1.2.2.1.1)
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "public"
request ID: 2136928328
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 540
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.2.1.2.2.1.1)
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "public"
request ID: 2136928328
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 540
SNMP Error:
no response received
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "public"
request ID: 2136928328
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 540
SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.1 on public@localhost:
at /usr/local/mrtg-2/bin/cfgmaker line 107


Well ... this alone should tell me that I will not get things to go right ... but I tried anyway with the following mrtg measurement of system load (in localhost.cfg):


WorkDir: /home/dnspro/public_html/mrtg/system

XSize[_]: 400
YSize[_]: 200

Target[cpusum]:ssCpuRawUser.0&ssCpuRawUser.0:public@localhost + ssCpuRawSystem.0&ssCpuRawSystem.0:public@localhost + ssCpuRawNice.0&ssCpuRawNice.0:public@localhost
RouterUptime[cpusum]: public@localhost
MaxBytes[cpusum]: 100
Title[cpusum]: CPU LOAD
PageTop[cpusum]: <H1>Active CPU Load %</H1>
Unscaled[cpusum]: ymwd
ShortLegend[cpusum]: %
YLegend[cpusum]: CPU Utilization
Legend1[cpusum]: Active CPU in % (Load)
Legend2[cpusum]:
Legend3[cpusum]:
Legend4[cpusum]:
LegendI[cpusum]: Active
LegendO[cpusum]:
Options[cpusum]: growright,nopercent


OK ... so now running mrtg on this cfg file givess me errors (well, by now ... these are not really suprising ... in fact, it's these are expected :( )


Unknown SNMP var ssCpuRawUser.0
at /usr/local/mrtg-2/bin/mrtg line 1491
Unknown SNMP var ssCpuRawUser.0
at /usr/local/mrtg-2/bin/mrtg line 1491
SNMP Error:
no response received
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "public"
request ID: 178093032
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 450
SNMPGET Problem for ssCpuRawUser.0 ssCpuRawUser.0 sysUptime sysName on public@localhost
at /usr/local/mrtg-2/bin/mrtg line 1491
WARNING: Expected a number but got ''
WARNING: Expected a number but got ''
Unknown SNMP var ssCpuRawSystem.0
at /usr/local/mrtg-2/bin/mrtg line 1491
Unknown SNMP var ssCpuRawSystem.0
at /usr/local/mrtg-2/bin/mrtg line 1491
SNMP Error:
no response received
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "public"
request ID: 178093033
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 450
SNMPGET Problem for ssCpuRawSystem.0 ssCpuRawSystem.0 sysUptime sysName on public@localhost
at /usr/local/mrtg-2/bin/mrtg line 1491
WARNING: Expected a number but got ''
WARNING: Expected a number but got ''
Unknown SNMP var ssCpuRawNice.0
at /usr/local/mrtg-2/bin/mrtg line 1491
Unknown SNMP var ssCpuRawNice.0
at /usr/local/mrtg-2/bin/mrtg line 1491
SNMP Error:
no response received
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "public"
request ID: 178093034
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 450
SNMPGET Problem for ssCpuRawNice.0 ssCpuRawNice.0 sysUptime sysName on public@localhost
at /usr/local/mrtg-2/bin/mrtg line 1491
WARNING: Expected a number but got ''
WARNING: Expected a number but got ''
SNMP Error:
no response received
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "public"
request ID: 178093035
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 450
SNMPGET Problem for sysUptime sysName on public@localhost
at /usr/local/mrtg-2/bin/mrtg line 339



Has anybody been able to configure their MRTG via SNMP? Have I just overlooked anything simple? Any help/advice/info will be greatly appreciated ...

cheers,
:beer:

serve-you
02-05-2002, 03:47 AM
Is it possible that public is not the correct community name?

-Dan

LinuxGroup
02-05-2002, 03:50 PM
Hi,

Whats the output of the following command




snmpwalk -c public localhost


You should get something like this




[root@server root]# snmpwalk -c public localhost
system.sysDescr.0 = Linux server.linuxgroup.net 2.4.7-10 #1 Thu Sep 6 16:46:36 EDT 2001 i686
system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.linux
system.sysUpTime.0 = Timeticks: (8917) 0:01:29.17
system.sysContact.0 = Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
system.sysName.0 = server.linuxgroup.net
system.sysLocation.0 = Unknown (edit /etc/snmp/snmpd.conf)
system.sysORLastChange.0 = Timeticks: (0) 0:00:00.00
system.sysORTable.sysOREntry.sysORID.1 = OID: ifMIB
system.sysORTable.sysOREntry.sysORID.2 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB
system.sysORTable.sysOREntry.sysORID.3 = OID: tcpMIB
system.sysORTable.sysOREntry.sysORID.4 = OID: ip
system.sysORTable.sysOREntry.sysORID.5 = OID: udpMIB
system.sysORTable.sysOREntry.sysORID.6 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpVacmMIB.vacmMIBConformance.vacmMIBGroups.vacmBasicGroup
system.sysORTable.sysOREntry.sysORID.7 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpFrameworkMIB.snmpFrameworkMIBConformance.snmpFrameworkMIBCompliances.snmpFrameworkMIBCompliance
system.sysORTable.sysOREntry.sysORID.8 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpMPDMIB.snmpMPDMIBConformance.snmpMPDMIBCompliances.snmpMPDCompliance
system.sysORTable.sysOREntry.sysORID.9 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpUsmMIB.usmMIBConformance.usmMIBCompliances.usmMIBCompliance
system.sysORTable.sysOREntry.sysORDescr.1 = The MIB module to describe generic objects for network interface sub-layers
system.sysORTable.sysOREntry.sysORDescr.2 = The MIB module for SNMPv2 entities
system.sysORTable.sysOREntry.sysORDescr.3 = The MIB module for managing TCP implementations
system.sysORTable.sysOREntry.sysORDescr.4 = The MIB module for managing IP and ICMP implementations
system.sysORTable.sysOREntry.sysORDescr.5 = The MIB module for managing UDP implementations
system.sysORTable.sysOREntry.sysORDescr.6 = View-based Access Control Model for SNMP.
system.sysORTable.sysOREntry.sysORDescr.7 = The SNMP Management Architecture MIB.
system.sysORTable.sysOREntry.sysORDescr.8 = The MIB for Message Processing and Dispatching.
system.sysORTable.sysOREntry.sysORDescr.9 = The management information definitions for the SNMP User-based Security Model.
system.sysORTable.sysOREntry.sysORUpTime.1 = Timeticks: (0) 0:00:00.00
system.sysORTable.sysOREntry.sysORUpTime.2 = Timeticks: (0) 0:00:00.00
system.sysORTable.sysOREntry.sysORUpTime.3 = Timeticks: (0) 0:00:00.00
system.sysORTable.sysOREntry.sysORUpTime.4 = Timeticks: (0) 0:00:00.00
system.sysORTable.sysOREntry.sysORUpTime.5 = Timeticks: (0) 0:00:00.00
system.sysORTable.sysOREntry.sysORUpTime.6 = Timeticks: (0) 0:00:00.00
system.sysORTable.sysOREntry.sysORUpTime.7 = Timeticks: (0) 0:00:00.00
system.sysORTable.sysOREntry.sysORUpTime.8 = Timeticks: (0) 0:00:00.00
system.sysORTable.sysOREntry.sysORUpTime.9 = Timeticks: (0) 0:00:00.00
End of MIB



Also make sure you have snmpd (the daemon) running. Start is by running the command snmpd. If you are unsure of there location, just do a whereis snmpd or whereis snmpwalk


From there I will see if i can help you

dektong
02-05-2002, 04:48 PM
thank you for the replies ...

running snmpd by invoking /etc/rc.d/init.d/snmpd start

output of snmpwalk -c public localhost:


root@neutrino [/home/admin/tong]# snmpwalk -c public localhost
system.sysDescr.0 = Linux neutrino.hostpropagation.net 2.4.16 #1 Thu Nov 29 19:39:04 EST 2001 i686
system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.linux
system.sysUpTime.0 = Timeticks: (779) 0:00:07.79
system.sysContact.0 = Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
system.sysName.0 = neutrino.hostpropagation.net
system.sysLocation.0 = Unknown (edit /etc/snmp/snmpd.conf)
system.sysORLastChange.0 = Timeticks: (2) 0:00:00.02
system.sysORTable.sysOREntry.sysORID.1 = OID: ifMIB
system.sysORTable.sysOREntry.sysORID.2 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB
system.sysORTable.sysOREntry.sysORID.3 = OID: tcpMIB
system.sysORTable.sysOREntry.sysORID.4 = OID: ip
system.sysORTable.sysOREntry.sysORID.5 = OID: udpMIB
system.sysORTable.sysOREntry.sysORID.6 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpVacmMIB.vacmMIBConformance.vacmMIBGroups.vacmBasicGroup
system.sysORTable.sysOREntry.sysORID.7 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpFrameworkMIB.snmpFrameworkMIBConformance.snmpFrameworkMIBCompliances.snmpFrameworkMIBCompliance
system.sysORTable.sysOREntry.sysORID.8 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpMPDMIB.snmpMPDMIBConformance.snmpMPDMIBCompliances.snmpMPDCompliance
system.sysORTable.sysOREntry.sysORID.9 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpUsmMIB.usmMIBConformance.usmMIBCompliances.usmMIBCompliance
system.sysORTable.sysOREntry.sysORDescr.1 = The MIB module to describe generic objects for network interface sub-layers
system.sysORTable.sysOREntry.sysORDescr.2 = The MIB module for SNMPv2 entities
system.sysORTable.sysOREntry.sysORDescr.3 = The MIB module for managing TCP implementations
system.sysORTable.sysOREntry.sysORDescr.4 = The MIB module for managing IP and ICMP implementations
system.sysORTable.sysOREntry.sysORDescr.5 = The MIB module for managing UDP implementations
system.sysORTable.sysOREntry.sysORDescr.6 = View-based Access Control Model for SNMP.
system.sysORTable.sysOREntry.sysORDescr.7 = The SNMP Management Architecture MIB.
system.sysORTable.sysOREntry.sysORDescr.8 = The MIB for Message Processing and Dispatching.
system.sysORTable.sysOREntry.sysORDescr.9 = The management information definitions for the SNMP User-based Security Model.
system.sysORTable.sysOREntry.sysORUpTime.1 = Timeticks: (2) 0:00:00.02
system.sysORTable.sysOREntry.sysORUpTime.2 = Timeticks: (2) 0:00:00.02
system.sysORTable.sysOREntry.sysORUpTime.3 = Timeticks: (2) 0:00:00.02
system.sysORTable.sysOREntry.sysORUpTime.4 = Timeticks: (2) 0:00:00.02
system.sysORTable.sysOREntry.sysORUpTime.5 = Timeticks: (2) 0:00:00.02
system.sysORTable.sysOREntry.sysORUpTime.6 = Timeticks: (2) 0:00:00.02
system.sysORTable.sysOREntry.sysORUpTime.7 = Timeticks: (2) 0:00:00.02
system.sysORTable.sysOREntry.sysORUpTime.8 = Timeticks: (2) 0:00:00.02
system.sysORTable.sysOREntry.sysORUpTime.9 = Timeticks: (2) 0:00:00.02
Timeout: No Response from localhost


I see there is a timeout error ... hm ... what does it mean? Getting close ... I will do some more research (but if you what the problem is, don't hesitate to help me out ;) )... Thanks ...

cheers,
:beer:

LinuxGroup
02-06-2002, 08:12 AM
Do you have a firewall setup? Are you using the latest vs of snmpd?