wooonix |
06-15-2009 07:02 PM |
Problem with MRTG and SNMP
Hello, currently I am a little confused about how to get MRTG working, been at it all day because the boss wants it done, any help would be greatly appreciated. Anywho.. this is where I am at.
the MRTG website says to start out with Cfgmaker and do this..so I put this into a script and ran it
Code:
cfgmaker --global 'WorkDir: /home/httpd/mrtg' \
--global 'Options[_]: bits,growright' \
--output /home/mrtg/cfg/mrtg.cfg \
community@router.abc.xyz
my current stats as ifconfig are:
Code:
ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:10.13.31.49 Bcast:10.13.31.255 Mask:255.255.255.0
inet6 addr: fe80::222:43ff:fe71:4b77/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13035 errors:0 dropped:0 overruns:0 frame:0
TX packets:7606 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17569654 (16.7 MiB) TX bytes:665099 (649.5 KiB)
so I modified what the website gave me and did it as:
Code:
#!/bin/sh
cfgmaker --global 'WorkDir: /home/woo/mrtg' \
--global 'Options[_]: bits,growright' \
--output /home/woo/project/cfg/mrtg.cfg \
community@10.13.31.49
the error i get when running this script is:
Code:
SNMP Error:
no response received
SNMPv1_Session (remote host: "10.13.31.49" [10.13.31.49].161)
community: "community"
request ID: 1558582216
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 629
SNMPWALK Problem for 1.3.6.1.2.1.1 on community@10.13.31.49::::::v4only
at /usr/bin/cfgmaker line 950
WARNING: Skipping community@10.13.31.49: as no info could be retrieved
I did a px ax | grep snmpd ...and it was running....
snmpwalk -v 1 -c public localhost gave me this..
Code:
snmpwalk -v 1 -c public localhost
SNMPv2-MIB::sysDescr.0 = STRING: Linux mobilez 2.6.27.19-170.2.35.fc10.i686 #1 SMP Mon Feb 23 13:21:22 EST 2009 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (226535) 0:37:45.35
SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: mobilez
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (42) 0:00:00.42
SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.7 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.8 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (41) 0:00:00.41
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (41) 0:00:00.41
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (41) 0:00:00.41
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (42) 0:00:00.42
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (42) 0:00:00.42
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (42) 0:00:00.42
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (42) 0:00:00.42
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (42) 0:00:00.42
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (258797) 0:43:07.97
End of MIB
Any help is hugely appreciated!!
|