[mrtg] graph Cisco total users

Castle, Shane scastle at co.boulder.co.us
Fri Oct 26 19:57:20 CEST 2007


This issue has been around for a long time, and the fundamental problem
is that SNMP ain't so S, and Cisco has always managed to hide their data
in obscure OIDs that can't be pointed to explicitly even in hours of
searching their KB.

I dug up this MRTG script from long ago when we used a Cisco device for
async dial-in.  (Warning! Solaris-specific paths!)  The OID values this
extracts probably DON'T EXIST in your device.  You MUST download all the
related Cisco MIBs, study them, point your snmpwalk to them, and try it
yourself.  This script was last modified in May 2002, so it's really
old.  It's so old that the name doesn't exist anymore so I don't care
about showing it; the RO community still does, though, so it has been
deleted.

We aren't even running MRTG any more; now it's NMIS
(http://sins.com.au/nmis/).

The piece of config that invokes this:
------------------------------------------------------------------------
-----------
### Active Async Port Count

Target[walnut_active]: `/usr/local/mrtg-2/bin/walnutcount`
SetEnv[walnut_active]: MRTG_INT_IP="" MRTG_INT_DESCR="AsyncCount"
Title[walnut_active]: Walnut Async Interface Use Count
Options[walnut_active]: gauge, growright, unknaszero, nopercent, integer
ShortLegend[walnut_active]: lines
YLegend[walnut_active]: Active Lines
LegendI[walnut_active]:  Active: 
LegendO[walnut_active]:
Legend1[walnut_active]: Total active async lines
Legend2[walnut_active]:
Legend3[walnut_active]: Maximal 5 Minute active lines
Legend4[walnut_active]:
MaxBytes[walnut_active]: 16
PageTop[walnut_active]: <H1>AsyncCount -- walnut.co.boulder.co.us</H1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>walnut.co.boulder.co.us in Boulder
County</TD></TR>
   <TR><TD>Description:</TD><TD>AsyncCount - Active Async Lines
</TD></TR>
 </TABLE>
 <hr>
 <a href="/cgi-bin/walnutuserlist">Show currently logged on users.</a>

------------------------------------------------------------------------
-------------
#/bin/ksh

# This will query the OID which in text form is:
#
.iso.org.dod.internet.private.enterprises.cisco.local.lts.ltsLineTable.l
tsLineEntry

# the lines numbered 1-16 are the modem-connected ones, and so are
# the only ones I am interested in.  The command pipe below will
# filter those out and count the ones that are "1", meaning active.

count=`/usr/local/bin/snmpwalk walnut <community>
.1.3.6.1.4.1.9.2.9.2.1.1 | /usr/xpg4/bin/egrep '\.([1-9] |1[0-6] )' |
/usr/xp
g4/bin/fgrep '= 1' | wc -l`
echo $count
echo "0\n0\n0"

--
Shane Castle
GSEC GCIH


-----Original Message-----
From: mrtg-bounces at lists.oetiker.ch
[mailto:mrtg-bounces at lists.oetiker.ch] On Behalf Of Dylan Bouterse
Sent: Friday, October 26, 2007 10:29
To: Volk,Gregory B; mrtg at lists.oetiker.ch
Subject: Re: [mrtg] graph Cisco total users

Unfortunately those OIDs don't work on my router. I don't get any
results back.

Dylan

-----Original Message-----
From: Volk,Gregory B [mailto:greg.volk at edwardjones.com] 
Sent: Friday, October 26, 2007 10:22 AM
To: Dylan Bouterse; mrtg at lists.oetiker.ch
Subject: RE: [mrtg] graph Cisco total users

Do your users show up as ppp and/or dial sessions? If so, you can
probably use the third template in
http://mrtg.gvolk.com/template/host-ras.template to plot Dial/PPP
Sessions over time.

-----Original Message-----
 

From: mrtg-bounces at lists.oetiker.ch
[mailto:mrtg-bounces at lists.oetiker.ch] On Behalf Of Dylan Bouterse
Sent: Friday, October 26, 2007 9:17 AM
To: mrtg at lists.oetiker.ch
Subject: [mrtg] graph Cisco total users

Does anyone know how to graph the total users in a Cisco? Is there an
OID that returns this? We terminate our DSL into a Cisco and I would
like to keep track of the total online users. Show users spits out a
list of users but not the total number. Show caller summary displays a
line by line summary of "calls" and unique users logged in but I don't
know how to write a script to pull that info and then integrate into
MRTG. Any help is greatly appreciated.

Dylan



More information about the mrtg mailing list