Operating System - Linux
1819794 Members
3374 Online
109607 Solutions
New Discussion юеВ

prblm in creating config file for mrtg via 'cfgmaker'

 
Maaz
Valued Contributor

prblm in creating config file for mrtg via 'cfgmaker'

Hello Dear Gurus.
OS: rhl 9, and rhel 4

I have installed and run SNMP, and successfuly run the #snmpwalk -v 1/2c maaz.snmp localhost system/interface.
but 'cfgmaker' doesnt run sucesfuly, here is the output

# cfgmaker -- output=/etc/mrtg/mrtgmy.conf --global "workdir:/var/www/mrtg" --global 'options[_]: growright,bits' maaz.mrtg@localhost
--base: Get Device Info on sharf.mrtg@localhost:
SNMP Error:
no response received
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "maaz.mrtg"
request ID: -929112389
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin//../lib/mrtg2/SNMP_util.pm line 627
SNMPWALK Problem for 1.3.6.1.2.1.1 on sharf.mrtg@localhost::::::v4only
at /usr/bin/cfgmaker line 831
WARNING: Skipping maaz.mrtg@localhost: as no info could be retrieved

--base: Writing /etc/mrtg/mrtgmy.conf
#

I have followed the tutorial from www.linuxhomenetworking.com/linux-hn/mrtg.htm

Any help will be highly appreciated.

Thanks n Regards
Maaz
3 REPLIES 3
Maaz
Valued Contributor

Re: prblm in creating config file for mrtg via 'cfgmaker'

plz ignore the above output of cfgmaker.
following is the accurate/exact output of "cfgmaker"

# cfgmaker -- output=/etc/mrtg/mrtgmy.conf --global "workdir:/var/www/mrtg" --global 'options[_]: growright,bits' maaz.mrtg@localhost
--base: Get Device Info on maaz.mrtg@localhost:
SNMP Error:
no response received
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "maaz.mrtg"
request ID: -929112389
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin//../lib/mrtg2/SNMP_util.pm line 627
SNMPWALK Problem for 1.3.6.1.2.1.1 on maaz.mrtg@localhost::::::v4only
at /usr/bin/cfgmaker line 831
WARNING: Skipping maaz.mrtg@localhost: as no info could be retrieved

--base: Writing /etc/mrtg/mrtgmy.conf
#
Maaz
Valued Contributor

Re: prblm in creating config file for mrtg via 'cfgmaker'

plz help me asap Dear GURUS

Regards
Maaz
Ivan Ferreira
Honored Contributor

Re: prblm in creating config file for mrtg via 'cfgmaker'

In your firt command, snmpwalk, you are using v1 or v2c, and probably you are getting response from v2c.

When you run cfgmaker, you run with SNMPv1 (SNMPv1_Session).

Try specifying v2 for cfgmaker:

Cfgmaker creates MRTG configuration files based on information pulled from a router or another SNMP manageable device.

[community@]router

Community is the community name of the device you want to create a configuration for. If not specified, it defaults to 'public'; you might want to try this first if you do not know the community name of a device. If you are using the wrong community name you will get no response from the device.

Router is the DNS name or the IP number of an SNMP-managable device. Following the name you can specify 6 further options separated by colons. The full syntax looks like this:

router[:[prt][:[tmout][:[retr][:[backoff][:vers]]]]]

Of special interest may be the last parameter, vers. If you set this to '2' then your device will be queried with SNMP version 2 requests.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?