OPNsense mk_check_agent won't work (freebsd)

2.0.0p17:
freebsd:

Error message:

i tried installing it with these steps
https://forum.opnsense.org/English_Forums/Tutorials_and_FAQs/Check_MK_Agent_setup

how can i get it to run?

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

Hi,

Well the instructions there worded for me, so, in theory it should work. How are you trying to access the agent? Via inetd or ssh? I remember that I switched to ssh in the end because opnsense kept resetting my changes in the configuration files at every reboot.

Louis

thanks for the answer louis, i used inetd.
how can i make sure that the agent is running?
if i execute it via ./check_mk_agent it will just stop at
<<local:sep(0)>>

and if i reboot and start inetd it does not work.
thanks for you help

Hi Marius,

You just described the reasons why I switched to ssh. If you reboot you’ll have to do most of the configuration again, as OpnSense will reset whatever changes you made in /etc/services and /etc/hosts.allow.

But what you always can try, after re-adding everything to the files, add also this line to /etc/hosts.allow:

check_mk_agent : 127.0.0.1 : allow

Make sure that’s before the deny all rule at the end. Then restart inetd:

/etc/rc.d/inetd onerestart

And try to access the agent from the command line:

telnet localhost 6556

That should give you the agent output

If that works, try from the CheckMK server (you may need to use nc -v instead of telnet there). If that doesn’t work, check if your CheckMK server is set correctly in hosts.allow. If so, maybe OpnSense is blocking something itself.

1 Like

thank you louis, this fixed my problem.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.