Merge pull request #3 from mo-ki/main

remove check_mk section
This commit is contained in:
Thorsten Spille 2023-02-18 21:05:19 +01:00 committed by GitHub
commit f3646613fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@
## SOFTWARE. ## SOFTWARE.
### ###
__VERSION__ = 0.87 __VERSION__ = 0.88
import sys import sys
import socket import socket
@ -635,8 +635,7 @@ if __name__ == '__main__':
parser.add_argument("host",type=str, parser.add_argument("host",type=str,
help="""Host name or IP address of Unifi Controller""") help="""Host name or IP address of Unifi Controller""")
args = parser.parse_args() args = parser.parse_args()
print("<<<check_mk>>>")
print(f"Version: {__VERSION__}")
try: try:
_api = unifi_controller_api(**args.__dict__) _api = unifi_controller_api(**args.__dict__)
except socket.error as e: except socket.error as e:
@ -644,7 +643,11 @@ if __name__ == '__main__':
sys.exit(1) sys.exit(1)
if _api.is_unifios: if _api.is_unifios:
print("AgentOS: UnifiOS")
labels = {"cmk/os_family": "UnifiOS"}
print("<<<labels:sep(0)>>>"
print(json.dumps(labels))
##pprint(_api.get_data("/stat/rogueap?within=4")) ##pprint(_api.get_data("/stat/rogueap?within=4"))
##pprint(_api.get_data("/rest/user",site="default",method="GET")) ##pprint(_api.get_data("/rest/user",site="default",method="GET"))
##pprint(_api.get_data("/stat/sta",site="default",method="GET")) ##pprint(_api.get_data("/stat/sta",site="default",method="GET"))