Automatic Setup of a CheckMK instance

Hello!
I was tasked with creating a Ansible Playbook which sets up CheckMK in an Docker Container and adds all monitors. Currently I am struggling with “finishing” the setup.

If I understand correctly when first starting the docker container with CheckMK in it, it finishes the setup upon the first login of the admin account. The problem is CheckMK (or at least the CheckMK Ansible task checkmk.general.site) doesnt allow a automated login (which would be done normally by the automation user).

The solution to stop the playbook and resume after the user has logged in is not possible because the finished product should be a “one-command”/one-click solution to set up the complete monitoring system.

My Question here is: how can I do this login (or in other terms finish setup) using Ansible or another tool executed by the Ansible playbook?

P.S.: Please note I am very, very new to CheckMK and I have never worked with it before. So if I am completely braindead and this question is “irrelevant” I am sorry.

Thank you in advance.

1 Like

Hello welcome
I don’t use docker but is that really true? how did you came to that conclution? Im not jugging here just trying to understand where it “failed”

2 Likes

It is correct that at the first start of the container the setup automatically creates the site and so on. But i think you don’t need a direct login to the site to finish this.

Do you have any error messages or problems in your process?

1 Like

Hello and thank you for your response.

Unfortunately I have no Error messages.

What could be another way to finish this setup? Is there a command line tool for this?

Hello Anders, thank you for your response.

I came to the conclusion after I checked the filesystem in the container (after “finishing” the setup via a login) and there was the automation user password in cleartext in a file. Then I reinstalled the container (remove container and volume) and looked into the filesystem. There was this file missing.

And I read about something similar that the setup finishes after the first login in the Docs.

1 Like

What version are you running?
The automation user should be crated when checkmk installs

2 Likes

In my container setups the automation user and his password file exists after the container is created and started without any login in the webpage.
The only step i do after creating the container is an automation to set the password for the cmkadmin account.

1 Like