LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-15-2009, 07:02 PM   #1
wooonix
LQ Newbie
 
Registered: Mar 2009
Posts: 11

Rep: Reputation: 0
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!!

Last edited by wooonix; 06-15-2009 at 09:57 PM.
 
Old 06-15-2009, 08:08 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Mageia Studio-13.37 Kubuntu.
Posts: 3,325
Blog Entries: 33

Rep: Reputation: 199Reputation: 199
Hi, Try not to display your hardware addresses in public, they may be tracked by malicious hackers.
Code:
Link encap:Ethernet  HWaddr 00:xx:xx:xx:xx:xx
(Yes, they can be forged (masqueraded), but if you knew how to do that, you would not publish it.) ;-)

your ip addressing as xx.xx.xx.xx is confusing the issue.

MRTG is looking for a FQDN (fully qualified domain name)at that line.

For instance your Hostname.

try....

uname -n

to see what that gives for the machine.
Quote:
glenn@GamesBox:~$ uname -n (16-06 11:04)
GamesBox.GlennsPref.net
glenn@GamesBox:~$ (16-06 11:04)
(This is actually a private (local) domain, it does not exist outside this machine. It is just for looks, instead of localhost) ;-)

It's named in /etc/hosts
Quote:
# generated by drakhosts
127.0.0.1 GamesBox.GlennsPref.net GamesBox localhost localhost,
192.168.0.2 GamesBox.GlennsPref.net GamesBox
Hope this helps.

Regards Glenn

Last edited by GlennsPref; 06-15-2009 at 08:20 PM.
 
Old 06-15-2009, 08:16 PM   #3
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Mageia Studio-13.37 Kubuntu.
Posts: 3,325
Blog Entries: 33

Rep: Reputation: 199Reputation: 199
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
change 10.13.31.49 to a fqdn.

localhost might work.

cheers, Glenn

I have found this page useful,

http://www.linuxhomenetworking.com/

Last edited by GlennsPref; 06-15-2009 at 08:26 PM. Reason: I have found this page useful
 
Old 06-15-2009, 09:59 PM   #4
wooonix
LQ Newbie
 
Registered: Mar 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks a bunch Glen, it helped a lot!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with mrtg and snmp ARCIS_house Linux - Newbie 1 04-29-2006 11:04 AM
openBSD vs MRTG snmp spatieman *BSD 0 01-19-2006 01:04 PM
snmp-mrtg ahmed4linux Linux - General 1 11-03-2004 07:27 AM
help with mrtg and snmp cristi1979 Linux - Networking 1 06-24-2003 08:49 PM
Snmp/mrtg hydro Linux - Software 1 06-15-2003 09:39 AM


All times are GMT -5. The time now is 11:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration