chuck
2018-11-26 18:58:16 UTC
I keep getting this maximum recursion depth exceeded. From what I can
see is it's getting stuck in a loop when parsing out my SNMP Request.
The OID only returns 1 value, but it looks like the script just keeps
looping over it and i'm not sure what i'm doing different than the other
scripts in the checks folder. I'm relatively new to both python and
CheckMK, so if I did something stupid, don't judge me too harsh lol. I'd
really appreciate some help on this though!
Also - this is my first time using a mailing list so if i'm using it
incorrect, I apologize.
Script below
----------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------
#!/usr/bin/python
import re
def inventory_raisecom_y1731_delay_avg(parsed):
   print(parsed)
   return inventory_raisecom_y1731_delay_avg(parsed)
def check_raisecom_y1731_delay_avg(item, params, parsed):
   return check_raisecom_y1731_delay_avg(item, params, parsed)
def parse_raisecom_y1731_delay_avg(info):
   print(re.findall(r'\b\d+\b', str(info)))
   parsed = re.findall(r'\b\d+\b', str(info))
   return parsed
check_info["y1731_delay_avg"] = {
   'check_function'           : check_raisecom_y1731_delay_avg,
   'inventory_function'       : inventory_raisecom_y1731_delay_avg,
   'parse_function'           : parse_raisecom_y1731_delay_avg,
   'snmp_info'                : (".1.3.6.1.4.1.8886.6.1.36.3.1.1.6",
["1"]),
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Output when running these commands below
cmk --checks=raisecom_y1731_delay_min -I 10.104.1.1
cmk -vII 10.104.1.1
['2788']
['2788']
['2788']
['2788']
['2788']
['2788']
['2788']
WARNING: Exception in discovery function of check type
'y1731_delay_avg': maximum recursion depth exceeded
 3 if64
 1 snmp_info
 1 snmp_uptime
SUCCESS - Found 5 services
see is it's getting stuck in a loop when parsing out my SNMP Request.
The OID only returns 1 value, but it looks like the script just keeps
looping over it and i'm not sure what i'm doing different than the other
scripts in the checks folder. I'm relatively new to both python and
CheckMK, so if I did something stupid, don't judge me too harsh lol. I'd
really appreciate some help on this though!
Also - this is my first time using a mailing list so if i'm using it
incorrect, I apologize.
Script below
----------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------
#!/usr/bin/python
import re
def inventory_raisecom_y1731_delay_avg(parsed):
   print(parsed)
   return inventory_raisecom_y1731_delay_avg(parsed)
def check_raisecom_y1731_delay_avg(item, params, parsed):
   return check_raisecom_y1731_delay_avg(item, params, parsed)
def parse_raisecom_y1731_delay_avg(info):
   print(re.findall(r'\b\d+\b', str(info)))
   parsed = re.findall(r'\b\d+\b', str(info))
   return parsed
check_info["y1731_delay_avg"] = {
   'check_function'           : check_raisecom_y1731_delay_avg,
   'inventory_function'       : inventory_raisecom_y1731_delay_avg,
   'parse_function'           : parse_raisecom_y1731_delay_avg,
   'snmp_info'                : (".1.3.6.1.4.1.8886.6.1.36.3.1.1.6",
["1"]),
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Output when running these commands below
cmk --checks=raisecom_y1731_delay_min -I 10.104.1.1
cmk -vII 10.104.1.1
['2788']
['2788']
['2788']
['2788']
['2788']
['2788']
['2788']
WARNING: Exception in discovery function of check type
'y1731_delay_avg': maximum recursion depth exceeded
 3 if64
 1 snmp_info
 1 snmp_uptime
SUCCESS - Found 5 services
--
Chuck Greve
Level I Support Technician
STARTOUCH INC
Ph.360.543.5679 Ext. 118
www.startouch.com
***@startouch.com
Washington State's Largest Microwave Internet Provider
Chuck Greve
Level I Support Technician
STARTOUCH INC
Ph.360.543.5679 Ext. 118
www.startouch.com
***@startouch.com
Washington State's Largest Microwave Internet Provider