I have checkmk deployed in a container using the RAW version, when I try to install an extension with the “cmk” command I receive the following error:
bash: cmk: command not found
I also tried the check_mk command and the result was the following:
bash: check_mk: command not found
How should I install extensions inside cmk when it is running in a container?
Also if you run CMK inside a container you need to be the site user inside the container.
log in to the container
cmk -P install name.mkp
Extending @andreas-doehler’s response, you can log in to the container using:
SITE_NAME=cmk # This is the default if you did not specify a name yourself
CONTAINER_NAME=monitoring # This is the default if you simply copied the command from the docs
docker exec -it $CONTAINER_NAME -u $SITE_NAME bash
(which logs you in directly as the site user, no need to do
su - sitename anymore)