[mrtg] Fw: Gather error

Margarita Aguilar S. maguilar at ecnet.ec
Tue Apr 1 16:24:27 MEST 2003


1. Ther portmaster.cfg file:

WorkDir: /usr/ns-home/docs/netmon/prueba
Target[portmaster]: `cat /usr/local/mrtg/prueba/pmgrand`
Title[portmaster]: Modem Traffic for Nantucket.net
PageTop[portmaster]: <center><H1>Modem Traffic</H1></center>
MaxBytes[portmaster]: 90
AbsMax[portmaster]: 90
Options[portmaster]: absolute, gauge
Ylegend[portmaster]: Total lines in use
RouterUptime[portmaster]:
ShortLegend[portmaster]: Modems Online
Unscaled[portmaster]: mwy
LegendI[portmaster]:
LegendO[portmaster]: Total
Legend2[portmaster]: <FONT Size=+2></FONT>Total count of all modems online
at <A HREF="http://www.ecua.net.ec</A>

Target[157.100.45.5]: `cat /usr/local/mrtg/prueba/pm1-log`
PageTop[157.100.45.5]: <center><H1>Modem Traffic on Portmaster
157.100.45.5</H1>
</center>
MaxBytes[157.100.45.5]: 30
AbsMax[157.100.45.5]: 30
Options[157.100.45.5]: absolute, gauge
Title[157.100.45.5]: Modem Traffic on Portmaster 157.100.45.5
Ylegend[157.100.45.5]: Lines in use
RouterUptime[157.100.45.5]:public at 157.100.45.5
ShortLegend[157.100.45.5]: Modems Online
Unscaled[157.100.45.5]: dmwy
LegendI[157.100.45.5]:
LegendO[157.100.45.5]: Total
Legend2[157.100.45.5]: Total count of modems used on Portmaster Sconset


2. Ther gather file:

#!/bin/csh

# run this script ever 5 minutes via cron with a crontab something like:
# 1,6,11,16,21,26,31,36,41,46,51,56 * * * * /home/admin/pmgraph/bin/getstats
# note that this script calls MRTG

# set the names or IP's of your Portmasters
set Portmaster1="nas09.uio.ecua.net.ec"

# set the SNMP read community of your Portmasters
set P1comm="public"

# Grab a user count for each Portmaster via the snmpwalk command
# You may need to use "snmpwalk -v 1" depending on your version of snmpwalk
# You may also need to grep for something other than "23"
set PM1=`/usr/local/bin/snmpwalk $Portmaster1 $P1comm
interfaces.ifTable.ifEntry
.ifType|grep 23 |wc -l`

# Get a grand total of users online
@ TOTAL=$PM1

# MRTG needs 4 lines of input to be happy, we're only interested in the 2nd
# line and possibly the first so we fill the others with junk

# write out the various logs
# grand total of all your Portmasters
        echo "0"    >  /usr/local/mrtg/prueba/pmgrand
        echo $TOTAL >> /usr/local/mrtg/prueba/pmgrand
        echo "0"    >> /usr/local/mrtg/prueba/pmgrand
        echo "0"    >> /usr/local/mrtg/prueba/pmgrand

# Portmaster #1
        echo "0"    >  /usr/local/mrtg/prueba/pm1-log
        echo $PM1   >> /usr/local/mrtg/prueba/pm1-log
        echo "time" >> /usr/local/mrtg/prueba/pm1-log
        echo "pm1"  >> /usr/local/mrtg/prueba/pm1-log


# and finally, run MRTG specifying our customized .cfg file
eval `/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg/prueba/portmaster.cfg`




----- Original Message -----
From: "Brett Marler" <bmarler at request.com.au>
To: "Margarita Aguilar S." <maguilar at ecnet.ec>; <mrtg at list.ee.ethz.ch>
Sent: Tuesday, April 01, 2003 2:00 AM
Subject: RE: [mrtg] Gather error


> Margarita,
>
> It looks like an issue with your configuration file. Can you post the
relevant parts of your config file for further assistance.
>
>
> Regards,
> Brett.
>
>
> > -----Original Message-----
> > From: Margarita Aguilar S. [mailto:maguilar at ecnet.ec]
> > Sent: Tuesday, 1 April 2003 5:40 AM
> > To: mrtg at list.ee.ethz.ch
> > Subject: [mrtg] Gather error
> >
> >
> > Hi all,
> > Does anyone knows why I receive the follwing error, when I
> > try to monitoring the lines in use with gather and portmaster
> > config file.
> >
> > Error:
> >   can't resolve "" to IP address
> >  at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 400
> > SNMPGET Problem for
> >  at /usr/local/mrtg-2/bin/mrtg line 390
> >
> > Regards,
> > Margarita
> >
> > --
> > Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> > Archive     http://www.ee.ethz.ch/~slist/mrtg
> > FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> > WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
> >
> >
>
>

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list