On Apr 12, 2005, at 9:00 PM, Robert Brewer wrote:
Naturally for the probe configuration you want to be able to enter in the peer IP address since that is a known quantity. I need to be able to take that IP address, look up the jnxBgpM2PeerIndex, and then use the jnxBgpM2PeerIndex as part of the OID that retrieves the number of prefixes received. I was hoping to do something like this:
<snmp-device-variables> jnxBgpM2PeerIndex, 1.3.6.1.4.1.2636.5.1.1.2.1.1.1.14.0.1.0.0.0.0.1.${BGP Peer IP}, DEFAULT BGP.Peer.Prefixes, 1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.${jnxBgpM2PeerIndex}.1.1, DEFAULT </snmp-device-variables>
I want to have that first OID retrieved and then use that value as part of the second OID.
This is not currently supported. InterMapper groups the SNMP query into a single request, rather than grouping the OID's into two or more sets of dependent requests. I agree it would be neat if it just worked. I will file that into our "enhancement request" queue.
I figured it was something like that. Thanks for putting it in the queue.
The other problem I encountered was in using the LEGEND field in the <snmp-device-variables> section. I want to have something like this:
This is a bug. I'ved fixed it for the next 4.3 build.
Cool. I was using :legend just for simplicity and because it was there. I've replaced it with the literal text from the LEGEND field, and put the variable back into the LEGEND field.
Attached is a final version 1.00 with the legend change. Can someone from Dartware throw this on the contributed probes page? Mahalo.
--
Robert Brewer ph: 808-532-8246
Assistant Manager, System Department fax: 808-529-0596
LavaNet, Inc. [EMAIL PROTECTED]<!--
SNMP - BGP Peer Prefix Count (Juniper) (net.lava.snmp.bgp-prefixes-jnx)
BGP Peer # of Prefixes on Juniper routers Custom SNMP Probe.
Custom Probe for InterMapper (http://www.intermapper.com)
Robert Brewer, LavaNet Inc., April 2005, [EMAIL PROTECTED]
Inspired by "SNMP - BGP" probe by "Dennis O'Reilly, University of British Columbia, May 2003, [EMAIL PROTECTED]"
-->
<header>
type = "custom-snmp"
package = "net.lava"
probe_name = "snmp.bgp-prefixes-jnx"
human_name = "SNMP - BGP Peer Prefix Count (Juniper)"
version = "1.00"
address_type = "IP"
port_number = "161"
flags = "NOLINKS,SNMPV2C"
</header>
<description>
\GB\SNMP - BGP Peer Prefix Count (Juniper)\P\
This probe monitors the number of prefixes received from a particular BGP peer on a Juniper JUNOS router using the \2U=http://www.juniper.net/techpubs/software/junos/junos70/swconfig70-net-mgmt/html/mib-jnx-bgpmib2.txt\BGP4-V2-MIB-JUNIPER MIB\P0\, and generates alarms when the number of prefixes drops below various thresholds (usually indication of a problem upstream). To monitor multiple BGP peering sessions, create multiple instances of this probe.
An unfortunate complexity is that the SNMP table that contains the prefix info is not indexed by IP address, rather it is indexed by a \i\jnxBgpM2PeerIndex\p\ that can change depending on the order that peers are configured on the router. Intermapper's custom SNMP probe type does not seem to be able to handle this type of indirection automatically, so you must enter the IP address of the peer and then check the resulting jnxBgpM2PeerIndex value and then come back and reconfigure the probe with that value as well. If the jnxBgpM2PeerIndex for the peer IP address changes (due to router reboot, disabling and re-enabling a peer, etc), the probe will go into alarm state and a human will have to check the new value in the status window and change the probe configuration.
Note that this probe does not work on Cisco routers. There is a comparable enterprise MIB from Cisco (\2U=http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature_guide09186a0080110bbc.html\CISCO-BGP4-MIB\P0\) that should be usable, but this probe would have to be modified to make that work.
\i\BGP Peer IP\p\ is the IP address of the BGP peer. Typically this is another router owned and operated by another service provider.
\i\BGP Peer Name\p\ is the name of the BGP peer.
\i\jnxBgpM2PeerIndex\p\ is the jnxBgpM2PeerIndex of the BGP peer, which must be determined by SNMP query to the jnxBgpM2PeerTable object.
\i\Low Prefix Count Threshold\p\, if the number of prefixes received is below this number, a warning will be raised.
\i\Very Low Prefix Count Threshold\p\, if the number of prefixes received is below this number there is a serious problem and an alarm will be raised.
</description>
<parameters>
"BGP Peer IP" = "10.0.0.0" "BGP Peer Name" = "BGP Peer" "jnxBgpM2PeerIndexParam" = "1" "Low Prefix Count Threshold" = "100000" "Very Low Prefix Count Threshold" = "100"
</parameters>
<snmp-device-variables>
-- TYPE can be one of: DEFAULT, PER-SECOND, PER-MINUTE, TOTAL-VALUE.
-- Use DEFAULT for string and integer values.
-- MIB Variable -- --- OID ---
--- TYPE --- --- LEGEND ---jnxBgpM2PeerIndex, 1.3.6.1.4.1.2636.5.1.1.2.1.1.1.14.0.1.0.0.0.0.1.${BGP Peer IP}, DEFAULT
BGP.Peer.Prefixes, 1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.${jnxBgpM2PeerIndexParam}.1.1, DEFAULT, "# of prefixes received via BGP from ${BGP Peer Name}"
</snmp-device-variables>
<snmp-device-thresholds>
alarm: ${jnxBgpM2PeerIndexParam} != ${jnxBgpM2PeerIndex} "jnxBgpM2PeerIndex changed, requires human attention and update"
warning: ${BGP.Peer.Prefixes} < ${Low Prefix Count Threshold} "low received prefix count"
alarm: ${BGP.Peer.Prefixes} < ${Very Low Prefix Count Threshold} "extremely low received prefix count"
</snmp-device-thresholds>
<snmp-device-display>
<!-- Disabled due to bug in Intermapper 4.2.5, scheduled to be fixed in 4.3?
\4\ ${BGP.Peer.Prefixes:legend}=\0\ ${BGP.Peer.Prefixes} -->
\B5\BGP Prefix Info for BGP Peer "${BGP Peer Name}" (${BGP Peer IP})\0P\
\4\ # of prefixes received via BGP =\0\ ${BGP.Peer.Prefixes}
\4\ jnxBgpM2PeerIndex=\0\ ${jnxBgpM2PeerIndex}</snmp-device-display>
