LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Closed Thread
  Search this Thread
Old 11-02-2004, 02:56 AM   #1
ahmed4linux
LQ Newbie
 
Registered: Aug 2004
Posts: 23

Rep: Reputation: 15
Exclamation snmp-mrtg


hi, all my friends out there.
I am trying to set up mrtg.
i am using Red HAT 9. this pc is in my local lan with local ip 192.168.1.65.
it is behind a proxy.
i am using one linux box to act as proxy router . using iptables and natting.

i installed net-snmp
net-snmp-5.0.6-17
and net-snmp-utils
also
mrtg-2.9.17-13

and it works fine with my local system
when i type
#snmpwalk -v 1 -c SECRETKEY localhost system
SNMPv2-MIB::sysDescr.0 = STRING: Linux ahmed4linux 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (10028) 0:01:40.28
SNMPv2-MIB::sysContact.0 = STRING: root@localhost
SNMPv2-MIB::sysName.0 = STRING: ahmed4linux
SNMPv2-MIB::sysLocation.0 = STRING: Unknown
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (2) 0:00:00.02
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: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (2) 0:00:00.02
______________________________________________________________
but when i try to communicate with my router or any ip outside.
# snmpwalk -v 1 -c SECRETKEY x.x.x.x
Timeout: No Response from x.x.x.x

installed mrtg its fine but when i try it on local host
#cfgmaker --output=/etc/mrtg/mrtg.cfg \
--global "workdir: /var/www/mrtg" -ifref=ip \
--global 'options[_]: growright,bits' \
SECRETKEY@localhost
_____________________________________________________
the out put is.

--base: Get Device Info on SECRETKEY@localhost:
--base: Vendor Id:
--base: Populating confcache
--snpo: confcache SECRETKEY@localhost: Descr -->
--snpo: confcache SECRETKEY@localhost: Ip 1.0 --> 2
--snpo: confcache SECRETKEY@localhost: Ip 2.0 --> 64
----
----
----
----
----
--snpo: confcache SECRETKEY@localhost: Ip 23.0 --> 0
--snpo: confcache SECRETKEY@localhost: Name -->
--snpo: confcache SECRETKEY@localhost: Type -->
--snpo: confcache SECRETKEY@localhost: Eth --> 1
--snpo: confcache SECRETKEY@localhost: Eth 00-50-da-84-4a-bf --> 2
--base: Get Interface Info
--base: Walking ifIndex
--base: Walking ifType
--base: Walking ifSpeed
--base: Walking ifAdminStatus
--base: Walking ifOperStatus
--base: Writing /etc/mrtg/mrtg.cfg
________________________________________________________
which i think is ok

but when i try to do same to my router
#cfgmaker --output=/etc/mrtg/x.x.x.x.cfg --global "workdir: /var/www/mrtg" -ifref=ip --global 'options[_]: growright,bits' SECRETKEY@x.x.x.x

--base: Get Device Info on SECRETKEY@62.149.67.126:
SNMP Error:
no response received
SNMPv1_Session (remote host: "62.149.67.126" [62.149.67.126].161)
community: "SECRETKEY"
request ID: 1226626036
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 450
SNMPGET Problem for sysDescr sysContact sysName sysLocation sysObjectID on SECRETKEY@62.149.67.126:
at /usr/bin/cfgmaker line 657
--base: Vendor Id:
--base: Populating confcache
--snpo: confcache SECRETKEY@62.149.67.126: Descr -->
--snpo: Skipping ipAdEntIfIndex scanning because SECRETKEY@62.149.67.126: does not seem to support it
--snpo: confcache SECRETKEY@62.149.67.126: Name -->
--snpo: confcache SECRETKEY@62.149.67.126: Type -->
--snpo: Skipping ifPhysAddress scanning because SECRETKEY@62.149.67.126: does not seem to support it
--base: Get Interface Info
--base: Walking ifIndex
SNMP Error:
no response received
__________
----------
------------------
------------
SNMP Error:
no response received
SNMPv1_Session (remote host: "62.149.67.126" [62.149.67.126].161)
community: "SECRETKEY"
request ID: 1226626043
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 540
SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.8 on SECRETKEY@62.149.67.126:
at /usr/bin/cfgmaker line 107
--base: Writing /etc/mrtg/62.149.67.126.cfg

_______________________________________________________
note :::
i put only this two lines
# vi /etc/snmp/snmpd.conf
rocommunity SECRETKEY
rwcommunity SECRETKEY
:wq!
__________________________
i copied EXAMPLE.conf /usr/local/share/snmp/snmpd.conf
and added these
com2sec local localhost SECRETKEY
com2sec mynetwork NETWORK/24 SECRETKEY
______________________________________
when i run this
#env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
WARNING: Could not match host:'SECRETKEY@localhost:' ref:'Ip' key:'21.1.2.192.168.1.0'
________________________________________
#env LANG=C /usr/bin/mrtg /etc/mrtg/62.149.67.126.cfg
no errors are there.
_______________________________________________________
#indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg
(or)
#indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/x.x.x.x.cfg
this is the same error as given below.

Possible precedence problem on bitwise | operator at /usr/bin/../lib/mrtg2/BER.pm line 601.
Can't locate package $VERSION for @MRTG_lib::ISA at /usr/bin/indexmaker line 49
main::BEGIN() called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
eval {...} called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
_________________________________________________________

this is all what i have done.
 
Old 11-03-2004, 07:27 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php
 
  


Closed Thread


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linksys, SNMP and mrtg Kyanos Linux - Software 2 03-19-2004 10:05 PM
Net-SNMP and MRTG Astro Linux - Networking 5 07-25-2003 03:24 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
Running SNMP in RH 7.2 (for MRTG) Token Linux - Software 0 06-12-2002 02:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:17 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration