From 5b13d9c78661b5eb3d1ae197bc63b6a68ba9420d Mon Sep 17 00:00:00 2001 From: Moritz Kiemer Date: Fri, 11 Mar 2022 15:12:01 +0100 Subject: [PATCH] remove check_mk section Writing the check_mk section no longer gives the desired results. See https://checkmk.com/de/werk/13705 --- share/check_mk/agents/special/agent_unifi_controller | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/share/check_mk/agents/special/agent_unifi_controller b/share/check_mk/agents/special/agent_unifi_controller index 26bab37..e229e5e 100644 --- a/share/check_mk/agents/special/agent_unifi_controller +++ b/share/check_mk/agents/special/agent_unifi_controller @@ -23,7 +23,7 @@ ## SOFTWARE. ### -__VERSION__ = 0.87 +__VERSION__ = 0.88 import sys import socket @@ -635,8 +635,7 @@ if __name__ == '__main__': parser.add_argument("host",type=str, help="""Host name or IP address of Unifi Controller""") args = parser.parse_args() - print("<<>>") - print(f"Version: {__VERSION__}") + try: _api = unifi_controller_api(**args.__dict__) except socket.error as e: @@ -644,7 +643,11 @@ if __name__ == '__main__': sys.exit(1) if _api.is_unifios: - print("AgentOS: UnifiOS") + + labels = {"cmk/os_family": "UnifiOS"} + print("<<>>" + print(json.dumps(labels)) + ##pprint(_api.get_data("/stat/rogueap?within=4")) ##pprint(_api.get_data("/rest/user",site="default",method="GET")) ##pprint(_api.get_data("/stat/sta",site="default",method="GET"))