Configuring CheckMK with Postfix in a docker container

Hi!
I have setup Checkmk in a docker container and most everything is working well. I want to be able to receive notifications through email and I am experimenting on how to get this working with Postfix. I have a postfix docker container GitHub - juanluisbaptiste/docker-postfix: Simple SMTP relay docker image. running with the following options:
359ff65a2503 juanluisbaptiste/postfix “/run.sh” 19 hours ago Up 19 hours 0.0.0.0:49153->25/tcp, :::49153->25/tcp postfix

I want to use this as a email relay for the checkmk instance, but have not figured out completely how to get this configured. I create my docker container using the following command:

sudo docker container run -dit -p 8180:5000 -e MAIL_RELAY_HOST='192.168.1.47:25' --ulimit nofile=1024 --tmpfs /opt/omd/sites/cmk/tmp:uid=1000,gid=1000 -v monitoring:/omd/sites --name monitoring -v /etc/localtime:/etc/localtime:ro --restart always checkmk/check-mk-raw:2.0.0-latest

The 192.168.1.47 is the docker host, so not completely sure how to reference the postfix docker container to make this work. Has anyone set this up so they can guide me in the right direction?

i realised it on testsystem with docker compose…

both containers in one compose.yml config, to ensure that the postfix container runs in same network like cmk…

but fyi: we had a distributed setup in the past… many slaves as a docker container, master in k8s cluster… performance was to bad so we decide to get back to native installation…

I had also such findings in my tests. Normal LXC container with proper resource definition is working fine. k8s was very bad for these type of workload as the performance requirements are very unsteady and the containers inside the k8s don’t adapt so quickly to the CPU needs.

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.