Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get output when runnin from host but no agent output #16

Open
yuljk opened this issue Oct 28, 2023 · 4 comments
Open

Get output when runnin from host but no agent output #16

yuljk opened this issue Oct 28, 2023 · 4 comments

Comments

@yuljk
Copy link

yuljk commented Oct 28, 2023

Hi - I've installed the mkp and enabled it on my host. If I run

./agent_unifi_controller -u myunifiadmin -p somepass --ignore-cert --piggyback
mycontrollerurl:8443

I get output regarding my SSID's etc - so all looks good.

If I go to Setup > Other integrations > Unifi Controller via API and setup my controller details and then run a discovery on the monitored host I just get an error regarding agent_unifi_controller and no data output.

I should note that I am monitoring vCenter with piggback data enabled - not sure if that is causing any issues.

Also - Do I need to place anything in my plugins folder on the monitored host for this to work? - I copied agent_unifi_controller and chmod 755, but that didn't help.

Not quite sure where I'm going wrong here, any help would be much appreciated!

Running Checkmk Raw Edition 2.2.0p12

@thetravellor
Copy link

thetravellor commented Oct 30, 2023

Hey yuljk I am trying to get to wor also, no luck here either.

May I ask how did you get the script to even run?

I did su to my OMD user and ran the script and got

OMD[monitoring]:~$ ./local/share/check_mk/checks/agent_unifi_controller
-bash: ./local/share/check_mk/checks/agent_unifi_controller: Permission denied
OMD[monitoring]:~$

OMD[monitoring]:~$ python3 ./local/share/check_mk/checks/agent_unifi_controller
Traceback (most recent call last):
  File "/opt/omd/sites/monitoring/./local/share/check_mk/checks/agent_unifi_controller", line 45, in <module>
    special_agent_info['unifi_controller'] = agent_unifi_controller_arguments
    ^^^^^^^^^^^^^^^^^^
NameError: name 'special_agent_info' is not defined
OMD[monitoring]:~$

Im kinda lost

@yuljk
Copy link
Author

yuljk commented Nov 2, 2023

Hi @thetravellor, what are the permissions of the agent_unifi_controller script? - It should be executable

@thetravellor
Copy link

Hi yuljk, I found an "additional" unifi controller integration that you can install in parallel (https://gitlab.com/checkmk-extensions/unifi)

Keep this one installed, but remove the rules associated with it
Install the new agent MKP and create a rule for it. I had to enable UDM Pro even though I am using a UCK Gen 2 for it to work. I also had to create a site in the UCK, as this script needs one to work properly.

I am now correctly getting piggyback data for my Unifi devices

@thetravellor
Copy link

thetravellor commented Nov 2, 2023

Screenshot 2023-11-03 at 10 53 33 am Screenshot 2023-11-03 at 10 55 17 am Screenshot 2023-11-03 at 10 56 20 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants