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"))