diff --git a/acgateway/acgateway-1.1.1.mkp b/acgateway/acgateway-1.1.1.mkp deleted file mode 100644 index 705ac248..00000000 Binary files a/acgateway/acgateway-1.1.1.mkp and /dev/null differ diff --git a/acgateway/acgateway-1.1.2.mkp b/acgateway/acgateway-1.1.2.mkp new file mode 100644 index 00000000..16fcd647 Binary files /dev/null and b/acgateway/acgateway-1.1.2.mkp differ diff --git a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_alarms.py b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_alarms.py index 06134afa..95ee446b 100644 --- a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_alarms.py +++ b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_alarms.py @@ -16,19 +16,19 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. -from .agent_based_api.v1 import ( +from cmk.base.plugins.agent_based.agent_based_api.v1 import ( + all_of, contains, register, render, Metric, - OIDEnd, Result, Service, SNMPTree, State, ) -import datetime +import datetime # type: ignore def _convert_date_and_time(octet_string): return datetime.datetime( @@ -77,7 +77,10 @@ def parse_acgateway_alarms(string_table): register.snmp_section( name="acgateway_alarms", - detect=contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + detect=all_of( + contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + contains(".1.3.6.1.2.1.1.1.0", "SW Version: 7.20A"), + ), parse_function=parse_acgateway_alarms, fetch=[ SNMPTree( diff --git a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_calls.py b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_calls.py index 920add5d..d7d10cae 100644 --- a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_calls.py +++ b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_calls.py @@ -17,6 +17,7 @@ # Boston, MA 02110-1301 USA. from .agent_based_api.v1 import ( + all_of, contains, get_rate, get_value_store, @@ -32,12 +33,7 @@ import time -from cmk.utils import debug -from pprint import pprint - def parse_acgateway_calls(string_table): - if debug.enabled(): - pprint(string_table) section = None if len(string_table) == 1: for active_calls, total_calls, asr, acd in string_table: @@ -47,13 +43,14 @@ def parse_acgateway_calls(string_table): 'asr': int(asr), 'acd': int(acd), } - if debug.enabled(): - pprint(section) return section register.snmp_section( name="acgateway_calls", - detect=contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + detect=all_of( + contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + contains(".1.3.6.1.2.1.1.1.0", "SW Version: 7.20A"), + ), parse_function=parse_acgateway_calls, fetch=SNMPTree( base='.1.3.6.1.4.1.5003.10.8.2', diff --git a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_ipgroup.py b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_ipgroup.py index fbcaaab4..f56b20a3 100644 --- a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_ipgroup.py +++ b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_ipgroup.py @@ -17,6 +17,7 @@ # Boston, MA 02110-1301 USA. from .agent_based_api.v1 import ( + all_of, contains, register, render, @@ -55,7 +56,10 @@ def parse_acgateway_ipgroup(string_table): register.snmp_section( name="acgateway_ipgroup", - detect=contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + detect=all_of( + contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + contains(".1.3.6.1.2.1.1.1.0", "SW Version: 7.20A"), + ), parse_function=parse_acgateway_ipgroup, fetch=SNMPTree( base='.1.3.6.1.4.1.5003.9.10.3.1.1.23.21.1', diff --git a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_sipinterface.py b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_sipinterface.py index 1cec6ecd..481e49df 100644 --- a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_sipinterface.py +++ b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_sipinterface.py @@ -17,6 +17,7 @@ # Boston, MA 02110-1301 USA. from .agent_based_api.v1 import ( + all_of, contains, register, render, @@ -99,7 +100,10 @@ def parse_acgateway_sipinterface(string_table): register.snmp_section( name="acgateway_sipinterface", - detect=contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + detect=all_of( + contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + contains(".1.3.6.1.2.1.1.1.0", "SW Version: 7.20A"), + ), parse_function=parse_acgateway_sipinterface, fetch=[ SNMPTree( diff --git a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_sipperf.py b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_sipperf.py index a4c7141d..ace4528f 100644 --- a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_sipperf.py +++ b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_sipperf.py @@ -17,6 +17,7 @@ # Boston, MA 02110-1301 USA. from cmk.base.plugins.agent_based.agent_based_api.v1 import ( + all_of, contains, get_rate, get_value_store, @@ -35,7 +36,10 @@ def parse_acgateway_sipperf(string_table): register.snmp_section( name="acgateway_sipperf", - detect=contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + detect=all_of( + contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + contains(".1.3.6.1.2.1.1.1.0", "SW Version: 7.20A"), + ), parse_function=parse_acgateway_sipperf, fetch=[ SNMPTree( diff --git a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_users.py b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_users.py index d93f3f3a..03b11802 100644 --- a/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_users.py +++ b/acgateway/lib/check_mk/base/plugins/agent_based/acgateway_users.py @@ -17,23 +17,19 @@ # Boston, MA 02110-1301 USA. from cmk.base.plugins.agent_based.agent_based_api.v1 import ( + all_of, contains, - get_rate, - get_value_store, register, - render, Metric, - OIDEnd, Result, Service, SNMPTree, State, ) -import time from cmk.utils import debug -from pprint import pprint +from pprint import pprint #type: ignore def parse_acgateway_users(string_table): if debug.enabled(): @@ -52,7 +48,10 @@ def parse_acgateway_users(string_table): register.snmp_section( name="acgateway_users", - detect=contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + detect=all_of( + contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.5003.8.1.1"), + contains(".1.3.6.1.2.1.1.1.0", "SW Version: 7.20A"), + ), parse_function=parse_acgateway_users, fetch=SNMPTree( base='.1.3.6.1.4.1.5003.10.8.2',