CheckMK How to install the linux agent but using other port?

CMK version: 2.0
OS version: Redhat

Hello,

I would like to know, how can i install the CheckMK Agent for UNIX, but using another port, not 6556.

I see this rule on the application " [TCP port for connection to Checkmk agent]" but what i need to change on the agent to specify another port?

Thank you.

Hello @Gustavo,

assuming you are using the raw edition:
You install the checkmk-agent on your host as usual, after that you have to change the configuration of your super-server, either xinetd or systemd, depending on the environment.
If you’re using xinetd, edit the file /etc/xinetd.d/check_mk where it says port = 6556 and change that to the desired port. After that restart the xinetd-service.
If you’re using systemd, edit the file /etc/systemd/systemd/check_mk.socket where it says ListenStream=6556 and change that accordingly. You could also implement this using a systemd-dropin-file if you want. After that restart the check_mk.socket systemd unit.
Once that is done you need to create the rule you already found for that host and specify the new port.

In the enterprise editions there may be a way of packaging the agent with another port already configured using the bakery, but i’m not really firm on these bakery-topics.

Sidenote: This is all with the agents in version < 2.1 in mind, with 2.1 there may be other files you need to edit if you’re using the new agent-controller.

Hope this helps.
Cheers,
Lorenz

2 Likes

Thank you very much for the information @lkoenig i really appreciated

For anyone curious how to do this in the new 2.1 agent:
Edit the pull_port setting inside this config: /var/lib/cmk-agent/cmk-agent-ctl.toml
Then Reload the agent: systemctl restart cmk-agent-ctl-daemon.service

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.