ThomasKaiser / Check_MK

Some Check_MK tweaks
GNU General Public License v2.0
27 stars 9 forks source link

Not reporting anymore after macOS Ventura 13.5.2 upgrade #7

Closed ashleykleynhans closed 1 year ago

ashleykleynhans commented 1 year ago

Thanks for the awesome work on this!

It was working for me for a few months, but I upgraded my Mac Minis to macOS 13.5.2 earlier today and although the agent is listening on port 6556, its no longer reporting any data back for some reason.

When I connect to port 6556, all I see is the following:

Escape character is '^]'.
<<<check_mk>>>
Version: 2.0.0p19
AgentOS: macosx 13.5.2 (22G91)

And no data for any of the actual services. Any advice would be greatly appreciated.

ThomasKaiser commented 1 year ago

Can't reproduce here:

tk@gaia:~$ telnet 10.0.154.3 6556
Trying 10.0.154.3...
Connected to 10.0.154.3.
Escape character is '^]'.
<<<check_mk>>>
Version: 2.0.0p19
AgentOS: macosx 13.5.2 (22G91)
Hostname: mac-tk
AgentDirectory: /etc/check_mk
DataDirectory: /var/lib/check_mk_agent
SpoolDirectory: /var/lib/check_mk_agent/spool
PluginsDirectory: /usr/local/lib/check_mk_agent/plugins
LocalDirectory: /usr/local/lib/check_mk_agent/local
<<<df>>>
/dev/disk3s1s1 apfs 482797652 8952784 473844868 5% /
/dev/disk3s6 apfs 482797652 20 482797632 1% /System/Volumes/VM
/dev/disk3s2 apfs 482797652 5112468 477685184 3% /System/Volumes/Preboot
/dev/disk3s4 apfs 482797652 88212 477969676 1% /System/Volumes/Update
...

You might try to execute /usr/local/bin/check_mk_agent locally as root to check whether that works or any error messages appear.

ashleykleynhans commented 1 year ago

Very strange, still hangs when I run it locally:

administrator@static ~ % sudo /usr/local/bin/check_mk_agent
<<<check_mk>>>
Version: 2.0.0p19
AgentOS: macosx 13.5.2 (22G91)

Gets stuck there and doesn't output anything else.

ThomasKaiser commented 1 year ago

After becoming root via sudo su - you can try to check what really happens by entering bash debug mode: /bin/bash -x /usr/local/bin/check_mk_agent.

Most probably systemsetup -getcomputername fails (for whatever reasons having nothing to do with the agent).

ashleykleynhans commented 1 year ago

Yes, you are correct, that systemsetup -getcomputername is just hanging for some reason after the upgrade, strange that its working for you though.

ThomasKaiser commented 1 year ago

strange that its working for you though.

I would call this normal (and in your case try to fix the issue with systemsetup -setcomputername $whatever). :)

ashleykleynhans commented 1 year ago

I hard-coded the hostname but still having issues where its hanging so will have to try to dig into it a bit deeper because its not ideal to hack everything to get it to work.

ashleykleynhans commented 1 year ago

I rebooted the machines and now suddenly everything is working as expected again 🤷 . Thanks for your help with this.