lippserd / docker-compose-icinga

docker-compose Icinga stack
92 stars 85 forks source link

icinga director not running? #10

Closed schafdog closed 2 years ago

schafdog commented 3 years ago

I am not sure if this is a bug or expected behaviour.

I am in process of migrating my icing 1.x to icinga 2 and wanted to use a container setup.

Starting the docker-compose seem to work alright: Everything except the init service (exit 0) is running. I can login and run the Director Wizard. but the UI has a warning that the director is not running:

The Icinga Director Background Daemon is not running. Please check our documentation in case you need step by step instructions showing you how to fix this.

I haven't found any useful documentation around this. What am I doing wrong and any pointer on how to fix?

schafdog commented 3 years ago

Started it manual in the icingaweb container. That seems to make it happy.

Benvandamme commented 2 years ago

I fixed this by adding an entrypointwrapper to the icingaweb-container.

docker-compose-icinga/env/icingaweb2/entrypoint_bash

#!/bin/bash

set -m
/entrypoint_bin bash -eo pipefail -c ". /etc/apache2/envvars; exec apache2 -DFOREGROUND"&
sleep 20
/usr/local/bin/icingacli director daemon run &
fg %1

and added this to the dockerfile somewhere after the composer block. docker-compose-icinga/env/icingaweb2/Dockerfile

RUN mv /entrypoint /entrypoint_bin

COPY entrypoint_bash /entrypoint

RUN chmod 777 /entrypoint
Benvandamme commented 2 years ago

Added pull request https://github.com/lippserd/docker-compose-icinga/pull/22

verboEse commented 2 years ago

The thing ist: icingacli isn't part of the icingaweb2 container. This cannot work from scratch. Either you copy icingacli manually to /usr/local/bin or you install it on image build. Or am I blind and don't see the magic that involves providing it?

Benvandamme commented 2 years ago

In my case it was already installed and only had to be started