Open kazatelm opened 5 years ago
Hello,
since 2015/v1.2.8 were changed get_counter to get_rate function. I change it like this and its work for me in version 1.5 - for r_type, count in queries: try: rate = get_rate( "bind.{0}".format(r_type.lower()), now, count) r_per_minute = int(rate 60) perfdata.append((r_type, int(rate 60), 10, 100)) except MKCounterWrapped: wrapped = True if wrapped: raise MKCounterWrapped("","Counter Wrapped") return (0, "OK", perfdata)
Hi,
I have an experience that the modified check https://github.com/wmbaum/check_mk-bind which includes an MKCounterWrapped, but in the basic is like your code, was crashed in version Check_mk 1.5.0 due to "NameError (global name 'get_counter' is not defined)" This check works for me in older version but in current release seems to be wrongly defined.
NameError (global name 'get_counter' is not defined)
Traceback | File "/omd/sites/devel150/lib/python/cmk_base/checking.py", line 336, in execute_check raw_result = check_function(item, determine_check_params(params), section_content)
File "/omd/sites/devel150/local/share/check_mk/checks/bind", line 41, in check timedif, rate = get_counter(
Maybe you can fix it in a short time.
Regards Milan.