# ADSL, MRTG, SNMP

## pikkumyy

I have an ADSL and a few Linux boxes connect through it, each resolving to their own IP (and not through a gateway linux box). I haveZyxel Prestige 642M ADSL modem that, atleast according to specs, supports SMTP. I've been reading the documentation at MRTG homepage, but it hasnät really helped.

When I configured my ISPs settings to the device, it told me to set my IP to 192.168.1.33,subnetmask 255.255.255.0, default gw 192.168.1.1 and telnet to 192.168.1.1 which worked out fine and I did notice from it's statistics RC and TX packets running nicely. But I can't set that IP perminately, of course, becouse I can't connect to net outside by adsl modem with it :)

----------

## kashani

 *pikkumyy wrote:*   

> I have an ADSL and a few Linux boxes connect through it, each resolving to their own IP (and not through a gateway linux box). I haveZyxel Prestige 642M ADSL modem that, atleast according to specs, supports SMTP. I've been reading the documentation at MRTG homepage, but it hasnät really helped.
> 
> When I configured my ISPs settings to the device, it told me to set my IP to 192.168.1.33,subnetmask 255.255.255.0, default gw 192.168.1.1 and telnet to 192.168.1.1 which worked out fine and I did notice from it's statistics RC and TX packets running nicely. But I can't set that IP perminately, of course, becouse I can't connect to net outside by adsl modem with it 

 

I'm not sure what your question is, but asuming you get you IP address stuff worked out,  I'll try and answer the MRTG/SNMP questions for you.

1. emerge net-snmp rrdtool mrtg apache

2. login into your ADSL router and set up a read only snmp string

3. mkdir /etc/mrtg

    mkdir /home/httpd/htdocs/mrtg

    mkdir /home/httpd/htdocs/mrtg/logs/

    mkdir /home/httpd/htdocs/mrtg/images

4. install mrtg-rrd.cgi into /home/httpd/cgi-bin/ and edit the config file to be /etc/mrtg/mrtg.cfg

http://www.fi.muni.cz/~kas/mrtg-rrd/

5. Use my cfgmake scripts and mrtg init script from

http://www.badapple.net/tech/mrtg.html

Once everything is running you should be able to see your graphs at

http://server/cgi-bin/mrtg-rrd.cgi

kashani

----------

## slott_hansen

Why is it that my cfgker isn't generating anything - all I get is this:

stjernen src # cfgmaker localhost

--base: Get Device Info on public@localhost:

SNMP Error:

no response received

SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)

                  community: "public"

                 request ID: -1941442942

                PDU bufsize: 8000 bytes

                    timeout: 2s

                    retries: 5

                    backoff: 1)

 at /usr/bin/../lib/mrtg2/SNMP_util.pm line 458

SNMPGET Problem for sysDescr sysContact sysName sysLocation sysObjectID on public@localhost:

 at /usr/bin/cfgmaker line 680

--base: Vendor Id: 

--base: Populating confcache

--snpo: Skipping ifDescr scanning because public@localhost: does not seem to support it

--snpo: Skipping ipAdEntIfIndex scanning because public@localhost: does not seem to support it

--snpo: Skipping ifName scanning because public@localhost: does not seem to support it

--snpo: Skipping ifType scanning because public@localhost: does not seem to support it

--snpo: Skipping ifPhysAddress scanning because public@localhost: does not seem to support it

--base: Get Interface Info

--base: Walking ifIndex

----------

## Hellfire

cfgmaker requiers the id string - `cfgmaker public@localhost --output=mrtg-localhost.cfg` or similar.

-h

----------

## slott_hansen

I know how to pipe it to a config file but still all I get is this:

 :Crying or Very sad: 

stjernen root # less mrtg-localhost.cfg 

# Created by 

# /usr/bin/cfgmaker public@localhost --output=mrtg-localhost.cfg

### Global Config Options

#  for UNIX

# WorkDir: /home/http/mrtg

#  or for NT

# WorkDir: c:\mrtgdata

### Global Defaults

#  to get bits instead of bytes and graphs growing to the right

# Options[_]: growright, bits

######################################################################

# System: 

# Description: 

# Contact: 

# Location: 

######################################################################

----------

## kashani

 *slott_hansen wrote:*   

> Why is it that my cfgker isn't generating anything - all I get is this:
> 
> stjernen src # cfgmaker localhost
> 
> --base: Get Device Info on public@localhost:
> ...

 

The above usually indicates that an snmp daemon isn't running. Check to see if your have an snmp process running and you can test by doing an snmpwalk against localhost. The man file gives a good example of a simple query.

kashani

----------

