Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


Closed Thread
  Search this Thread
Old 11-02-2004, 03:56 AM   #1
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
it is behind a proxy.
i am using one linux box to act as proxy router . using iptables and natting.

i installed net-snmp
and net-snmp-utils

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.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.4 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
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' \
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@
SNMP Error:
no response received
SNMPv1_Session (remote host: "" [].161)
community: "SECRETKEY"
request ID: 1226626036
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin/../lib/mrtg2/ line 450
SNMPGET Problem for sysDescr sysContact sysName sysLocation sysObjectID on SECRETKEY@
at /usr/bin/cfgmaker line 657
--base: Vendor Id:
--base: Populating confcache
--snpo: confcache SECRETKEY@ Descr -->
--snpo: Skipping ipAdEntIfIndex scanning because SECRETKEY@ does not seem to support it
--snpo: confcache SECRETKEY@ Name -->
--snpo: confcache SECRETKEY@ Type -->
--snpo: Skipping ifPhysAddress scanning because SECRETKEY@ 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: "" [].161)
community: "SECRETKEY"
request ID: 1226626043
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin/../lib/mrtg2/ line 540
at /usr/bin/cfgmaker line 107
--base: Writing /etc/mrtg/

note :::
i put only this two lines
# vi /etc/snmp/snmpd.conf
rocommunity SECRETKEY
rwcommunity SECRETKEY
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:''
#env LANG=C /usr/bin/mrtg /etc/mrtg/
no errors are there.
#indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg
#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/ 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/ line 49
eval {...} called at /usr/bin/../lib/mrtg2/ line 49

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

Rep: Reputation: 235Reputation: 235Reputation: 235
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.

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 11:05 PM
Net-SNMP and MRTG Astro Linux - Networking 5 07-25-2003 04:24 AM
help with mrtg and snmp cristi1979 Linux - Networking 1 06-24-2003 09:49 PM
Snmp/mrtg hydro Linux - Software 1 06-15-2003 10:39 AM
Running SNMP in RH 7.2 (for MRTG) Token Linux - Software 0 06-12-2002 03:05 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:59 PM.

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