Change the MySQL port of the MySQL agent check?

Hello,

we have a MySQL-Server running on a different port than the standard port tcp/3306. I was not able to find a way to change the port for the agent check in the agent rules for MySQL. I tried to change the hostname to something like

127.0.0.1:33306

but this does not work.

Has someone a hint how I can change the port?

Thanks! Marc

Hello @marc.jakobs,
it looks like the config-file for the agent-plugin is in the standart MySQL-options-file format and the mk_mysql-plugin just passes that file to mysqladmin. So maybe if you just add port=33306 in the config-file for the plugin it will get picked up.
Edit: I was assuming you are talking about the agent-plugin…

Thank you for the suggestion! I had the same idea already, but was thinking that it may be not a too good idea because the file is managed by the checkmk server/agent so it could be overwritten once and a while?

That is true if you are using the Agent Bakery for deploying and updating the agents and plugins. The ruleset for deploying the mysql-plugin indeed seems to miss the port-specification, so there probably is no way to configure this via the Agent Bakery right now.
I am not that firm on these Agent Bakery topics, maybe if you don’t deploy the plugin via the Bakery or don’t specify any options it won’t touch the config file. This however is just me guessing how these update-mechanisms for the plugins and config-files work.
But you should be able to try it out and see what happens.
Furthermore, you can head over to the Feature-Request-Portal and create a feature-request, there may be some other users that are missing this feature too…

1 Like

All right. I added a feature request. I hope this will be implemented (soon). Should not be a big deal…

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.