11#!/usr/bin/python
22
3+ """
4+ This plugin can check the status of one or more IP SLA entries on a Cisco IOS device.
5+ IP SLAs can be used to monitor IP service levels for various IP applications and services. See the Cisco website
6+ for more details on SLA entries and their use. One simple usage example is to monitor a multi-connection
7+ failover routing setup to monitor SLAs which ping the other end of each line. SLA's can be set up to monitor
8+ a line/route and when this line goes down, the corresponding SLA will go down which this plugin can monitor.
9+ This is just one example, however SLAs can be configured for various other tasks.
10+ For more info on IP SLA's, see the manual for your Cisco device on IP SLA's.
11+ """
12+
313import argparse
414from easysnmp import Session
515from easysnmp .exceptions import *
616
7- 17+ __author__ = "Maarten Hoogveld"
18+ __version__ = "1.0.1"
19+ 20+ __licence__ = "GPL-3.0"
21+ __status__ = "Production"
822
923
1024class CiscoIpSlaChecker :
@@ -207,8 +221,8 @@ def read_rtt_entries(self):
207221 rtt_ctrl_admin_entries = self .session .walk (".1.3.6.1.4.1.9.9.42.1.2.1.1" )
208222 for item in rtt_ctrl_admin_entries :
209223 oid_parts = str (item .oid ).split ("." )
210- rtt_entry = oid_parts [- 1 ]
211- rtt_info_type = oid_parts [ - 2 ]
224+ rtt_info_type = oid_parts [- 1 ]
225+ rtt_entry = str ( item . oid_index )
212226
213227 if rtt_entry not in self .rtt_dict :
214228 self .rtt_dict [rtt_entry ] = dict ()
@@ -227,8 +241,8 @@ def read_rtt_entries(self):
227241 rtt_ctrl_oper_entries = self .session .walk (".1.3.6.1.4.1.9.9.42.1.2.9.1" )
228242 for item in rtt_ctrl_oper_entries :
229243 oid_parts = str (item .oid ).split ("." )
230- rtt_entry = oid_parts [- 1 ]
231- rtt_info_type = oid_parts [ - 2 ]
244+ rtt_info_type = oid_parts [- 1 ]
245+ rtt_entry = str ( item . oid_index )
232246
233247 if "5" == rtt_info_type :
234248 # rttMonCtrlOperConnectionLostOccurred (5)
0 commit comments