|
Extended Host Name Syntax
In all places where ``community@router'' is accepted, you can add additional parameters for the SNMP communication using colon-separated suffixes. You can also append a pipe symbol ( | ) and the name of a numeric conversion subroutine as described under the global keyword `ConversionCode'' above. The full syntax is as follows:
community@router[:[port][:[timeout][:[retries][:[backoff][:[version]][|name]]]]]
where the meaning of each parameter is as follows:
port
the UDP port under which to contact the SNMP agent (default: 161)
timeout
initial timeout for SNMP queries, in seconds (default: 2.0)
retries
number of times a timed-out request will be retried (default: 5)
backoff
factor by which the timeout is multiplied on every retry (default: 1.0).
version
for SNMP version. If you have a fast router you might want to put a '2' here. This will make mrtg try to poll the 64 bit counters and thus prevent excessive counter wrapping. Not all routers support this though.
Example:
3:public@router1:::::2
name
the name of the subroutine that MRTG will call to convert the input and output values to integers. See the complete example under the global keyword ``ConversionCode'' above.
Example:
1.3.6.1.4.1.999.1&1.3.6.1.4.1.999.2:public@mydevice:161::::2|Length2Int
This would retrieve values from the OID 1.3.6.1.4.1.999.1 for input and .2 for output on mydevice using UDP port 161 and SNMP version 2, and would execute the user-defined numeric conversion subroutine Length2Int to convert those values to integers.
A value that equals the default value can be omitted. Trailing colons can be omitted, too. The pipe symbol followed by the name parameter, if present, must come at the end. There must be no spaces around the colons or pipe symbol.
Example:
Target[ezci]: 1:public@ezci-ether.ethz.ch:9161::4
This would refer to the input/output octet counters for the interface with ifIndex 1 on ezci-ether.ethz.ch, as known by the SNMP agent listening on UDP port 9161. The standard initial timeout (2.0 seconds) is used, but the number of retries is set to four. The backoff value is the default.
_________________ Michael Cotrone - CCIE #8411, CIPT, IPCC Express Certified Sr. Network Engineer Datanet Services, Inc.
|