Automate the agent registration

Hi Forum,

I’m trying to automate the agent registration but I keep getting a authentication error

Successfully read C:\ProgramData\checkmk\agent\config\cmk-update-agent.state.
Successfully read C:\ProgramData\checkmk\agent\config\cmk-update-agent.cfg.
Going to register agent at deployment server
Authenticating at Checkmk Server (using requests):
http://serverip/site/check_mk/login.py
Cannot authenticate, invalid user/passwort/secret.

I have followed these steps :
https://checkmk.atlassian.net/wiki/spaces/KB/pages/9471681/Agent+registration+role

I have also tested other methods, also assigned the “agent registration user” nothing works

When the profile Administrator is assigned it works

I was able to fix this when I use a “Normal User” with login and pasword, but we want to prevent login into the gui

Hi,

Which Param you use to pass the Secret? For Windows in my Ansible I used --password which is working fine with an automation secret.:

Hi Bastian,

I have issues with agen registrations not tls activation
cmk-agent-ctl is used for tls activation this actually almost never fails, and yes you need secret en not password when using an automation user :slight_smile:

Hi Karl,

That would allow the user to login in the gui, we want to prevent this

So you wan’t to do the Bakery Registration not the Agent Registration? There -S {{cmk_secret }} works for me :slight_smile:

3 Likes

-S is the solution, I will like your response !

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.