check-unifi-controller icon indicating copy to clipboard operation
check-unifi-controller copied to clipboard

CMK 2.2

Open gurubert opened this issue 1 year ago • 6 comments
trafficstars

CMK 2.2 and 2.3 compatability

gurubert avatar Aug 08 '24 13:08 gurubert

when I try your patch I get the following error message (checkmk 2.3.0-p13-1)

Agent exited with code 1: /omd/sites/t/local/share/check_mk/agents/special/agent_unifi_controller:441: SyntaxWarning: invalid escape sequence '\d' self.cloudkey_version = re.sub(".?v(\d+.\d+.\d+.[a-z0-9]+).","\1",self.cloudkey_version)

would love to see a functional vesion for 2.3.0! :-)

grufocom avatar Aug 28 '24 08:08 grufocom

Hi Robert,

tried that already and now I get this error:

Agent exited with code 1: Traceback (most recent call last): File "/omd/sites/t/local/share/check_mk/agents/special/agent_unifi_controller", line 644, in _api = unifi_controller_api(**args.dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Any idea for me? Regrads Manfred

grufocom avatar Aug 28 '24 08:08 grufocom

There is half of the Traceback missing.

I have this current version running on a CMK 2.2 site without issues.

gurubert avatar Aug 28 '24 09:08 gurubert

Had it already running but since update to 2.3.0-p13 it failed and I tried your mkp :-) Login did not change... -> login via web works.

OMD[t]:~$ cmk --debug UDMPro [special_unifi_controller] unifi_api_exception: Login failed(!!), [piggyback] Success (but no data found for this host), Missing monitoring data for all plugins(!), execution time 0.4 sec | execution_time=0.420 user_time=0.030 system_time=0.000 children_user_time=0.230 children_system_time=0.040 cmk_time_ds=0.120 cmk_time_agent=0.000 Agent exited with code 1: Traceback (most recent call last): File "/omd/sites/t/local/share/check_mk/agents/special/agent_unifi_controller", line 644, in _api = unifi_controller_api(**args.dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/omd/sites/t/local/share/check_mk/agents/special/agent_unifi_controller", line 555, in init self.login(username,password) File "/omd/sites/t/local/share/check_mk/agents/special/agent_unifi_controller", line 589, in login raise unifi_api_exception("Login failed") unifi_api_exception: Login failed(!!)

grufocom avatar Aug 28 '24 09:08 grufocom

I am not able to debug login issue in this pull request.

gurubert avatar Aug 28 '24 13:08 gurubert

found the solution and the reason why it did work until I installed your new package:

https://github.com/bashclub/check-unifi-controller/issues/19

def check_unifi_os(self): _response = self.request("GET", url=self.url, allow_redirects=False) self.is_unifios = _response.status_code == 200

now it works perfect! thank you manfred

grufocom avatar Aug 28 '24 14:08 grufocom