Re: (PM) snmp monitoring

Mike@NetDotCom ("Mike@NetDotCom")
Fri, 12 Jun 1998 12:46:08 -0400

Here's my actual production script.

I use this on NT4.0. It require no external programs other than that which
is required by MRTG on NT. I had looked into the contrib folder included
with MRTG but found most of the scripts were designed for UNIX and using
external snmp programs (snmpwalk) to gather data. Some scripts are
separating and counting the type of connections from modems and ISDN. I just
want to count the number of ports in use to backup our claims of no busy
signals as all or our ports support modems anyways.

I then used an SNMP browser (www.mg-soft.com) and found the OID's that
supplied the data I needed and used MRTG's math ability to arrive a the
proper values.

There is also was some discussion that MP logins would only show up as one
port rather than actually two. But seeing as I am counting the number of
active ports this may not apply. Also as I do not have any clients using
this as yet. (Local telco not pushing ISDN) It is not a problem.

This works for me. It is subject to possible inaccurate results (see
comments), therefore use at your own risk. Seeing as it is not mission
critical (other than backing up our marketing claims) I don't want any
flames.

Mike

WorkDir: c:\inetpub\wwwroot\MRTG
WriteExpires: Yes
#---------------------------------------------------------------
#
# MRTG configuration file to determine number of modems/lines
# in use on Livingston Portmasters
#
# Section one gets the info from portmaster 1 using SNMP
# The values to be read are:
# OID Name: ifNumber
# OID: 1.3.6.1.2.1.2.1
# OID full path:
iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).interfaces(2).ifNumber(1)
# The ifNumber returns the number of interfaces currently in use, including
ether0
# The SNMP MIB states that this value should be the total number of ports
regardless
# of their state. PMs return the number of ports in use. (an anomoly
perhaps?)
#
# OID Name: ipReasmTimeout
# OID: 1.3.6.1.2.1.4.13
# OID full path:
iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).ip(4).ipReasmTimeout(13)
# Returns 0 (necessary for mrtg to graph two values) This value may change
although under most
# circumstances it seems it should return zero. I had attempted (according
to the MRTG Docs) to
# subtract a value of one in the target line but then the script did not
return any values.
# I wanted explore this further but lacked the time and this continues to
work correctly although
# it is subject to possible inaccurate results.
#
# OID Name: ipForwarding
# OID 1.3.6.1.2.1.4.1.0
# OID full path:
iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).ip(4).ipForwarding(1)
# Returns a value of 1 to subtract from the number of active ports to
account for the
# ethernet port, which is alway active and would skew the number of users by
1
#
# --------------- Section One --------------------------------------------
Target[pm2a]:
1.3.6.1.2.1.2.1.0&1.3.6.1.2.1.4.13.0:public@pm2a.netdotcom.com -
1.3.6.1.2.1.4.1.0&1.3.6.1.2.1.4.13.0:public@pm2a.netdotcom.com
Title[pm2a]: NetDotCom Modem Usage on Portmaster 2a
PageTop[pm2a]: <center><H2>Modem Usage on Portmaster
2a</H2></center>Portmaster 2a can handle 24 modems running at up to 33.6Kbps
each.
MaxBytes[pm2a]: 24
AbsMax[pm2a]: 24
Options[pm2a]: absolute, gauge
WithPeak[pm2a]: wmy
Colours[pm2a]: Green#00FF00, Black#000000, Blue#0000FF, Black#000000
YLegend[pm2a]: Modems Available
LegendO[pm2a]:
Legend1[pm2a]: Modems in Use
Legend2[pm2a]:
Legend3[pm2a]: Peak Modem Usage
Legend4[pm2a]:
ShortLegend[pm2a]:&nbsp;Modems in Use&nbsp;
Unscaled[pm2a]: dwmy

-
To unsubscribe, email 'majordomo@livingston.com' with
'unsubscribe portmaster-users' in the body of the message.
Searchable list archive: <URL:http://www.livingston.com/Tech/archive/>