[mrtg] Re: Monitoring Gigabit Ethernet ports...

Daniel J McDonald dmcdonald at digicontech.com
Wed May 23 15:00:55 MEST 2001


>You have 5 :'s in there is that right or should it be 4 ?

yes, five is the right number.

>From the readme for the module that mrtg uses to do its polling:
snmpget(community at host:port:timeout:retries:backoff:version, OID, [OID...])

[...]
The rest of the functions require a hostname/IP address as the first
argument.  The community string, port number, timeout, retries, backoff,
and version parameters are all optional.  If the community string isn't
specified, "public" is used.  If the port number isn't specified, the
default value from SNMP_Sesssion.pm (port 161) is used for everything but
snmptrap().  snmptrap() uses port 162 as its default.

The port parameter was recently augmented to allow the specification of
the IP address (or hostname) and port of the machine doing the query in
addition to the IP address (or hostname) and port of the machine being
queried.  Some machines have additional security features that only allow
SNMP queries to come from certain IP addresses.  If the host doing the
query has multiple interface, it may be necessary to specify the interface
the query should come from.  The port parameter is further broken down into
"remote_port!local_address!local_port".  Here are some examples:

    somehost
    somehost:161
    somehost:161!192.168.2.4!4000  use 192.168.2.4 and port 4000 as source
    somehost:!192.168.2.4          use 192.168.2.4 as source
    somehost:!!4000                use port 4000 as source

Most people will only need to use the first form ("somehost").

The timeout, retries, and backoff parameters default to whatever
SNMP_Session.pm uses.  For SNMP_Session.pm version 0.83 they are 2 seconds,
5 retries, and a 1.0 backoff factor.  The backoff factor is used as a
multiplier to increase the timeout after every retry.  With a backoff factor
of 1.0 the timeout stays the same for every retry.

The version parameter defaults to SNMP version 1.  Some SNMP values such as
64-bit counters have to be queried using SNMP version 2.  Specifying "2" or
"2c" as the version parameter will accomplish this.

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

I'm using a somewhat newer version of the SNMP_utils.pm module than is
distributed with MRTG today, but at least the version part has worked for a
long time...


--
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