Skip to content

Commit

Permalink
Merge pull request #3 from mo-ki/main
Browse files Browse the repository at this point in the history
remove check_mk section
  • Loading branch information
thorstenspille authored Feb 18, 2023
2 parents d67358a + 5b13d9c commit f364661
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions share/check_mk/agents/special/agent_unifi_controller
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
## SOFTWARE.

###
__VERSION__ = 0.87
__VERSION__ = 0.88

import sys
import socket
Expand Down Expand Up @@ -635,16 +635,19 @@ if __name__ == '__main__':
parser.add_argument("host",type=str,
help="""Host name or IP address of Unifi Controller""")
args = parser.parse_args()
print("<<<check_mk>>>")
print(f"Version: {__VERSION__}")

try:
_api = unifi_controller_api(**args.__dict__)
except socket.error as e:
pprint(e)
sys.exit(1)

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("/rest/user",site="default",method="GET"))
##pprint(_api.get_data("/stat/sta",site="default",method="GET"))
Expand Down

0 comments on commit f364661

Please sign in to comment.