Registration to my checkmk server fails with 401 Unauthorized

Hi everybody,
i’am new to checkmk and trying to configure the agent but getting the same message, i couldn’t understand why.
Basically i installed checkmk site into Docker then i installed the agent into the desired server, but when i run the command:
sudo cmk-agent-ctl register -vv --hostname name --server ip:8000 --site cmk --user user --password pass

i’am getting the desired certificate but after i got:

Do you want to establish this connection? [Y/n]
> y
DEBUG [reqwest::connect] starting new connection: https://ip:8000/
DEBUG [reqwest::async_impl::client] response '401 Unauthorized' for https://ip:8000/cmk/agent-receiver/pairing
ERROR [cmk_agent_ctl] Error pairing with ip:8000/cmk

Caused by:
    Request failed with code 401 Unauthorized: You need to be authenticated to use the REST API.

If somone could explain to me, what’s wrong or help me with the right documentation.

Hey,

are you using the automation user? if not, try it with the automation User

1 Like

What do mean by automation user ?
You mean using ansible to install it ?

[…] Checkmk provides the concept of automation users. These users are exclusively for remote control and do not allow a normal login via the GUI. […]

1 Like

Thank you for your guidance @martin.schwarz , @mey.eric thank you for your answer
Worked perfectly !

1 Like

Glad it helped, but you should probably mark @mey.eric’s reply as the solution, not mine.

1 Like

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.