Giter Site home page Giter Site logo

docker-compose-icinga's People

Contributors

dwt avatar lippserd avatar michaelschindhelm avatar paperle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-compose-icinga's Issues

Package ipl/stdlib at version dev-master has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version

Is there an easy way to get a working php version please

Created directory: /var/lib/snmp/cert_indexes

In InitCommand.php line 749:

  Package ipl/stdlib at version dev-master has a PHP requirement incompatible
   with your PHP version, PHP extensions and Composer version


require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-scripts] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]

ERROR: Service 'icingaweb' failed to build: The command '/bin/sh -c apt update     && apt install -y composer     && composer require -d /usr/share/icinga-php/ipl ipl/stdlib:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/html:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/orm:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/sql:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/validator:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/web:dev-master     && composer update -d /usr/share/icinga-php/ipl' returned a non-zero code: 1

Better integration into the Icinga ecosystem

Hi there,

this project is really useful, as it ties all the docker containers together into a useable whole that one can actually test.

Currently the only way to discover this is through a blog post on the icinga website, however it would be really nice if

  • The documentation mentions this as a way to evaluate (and possibly) run icinga
  • Maybe the repo was part of the icinga/ namespace so it is easily discoverable when browsing the icinga repos - also this might be a precondition to tightly linking this into the documentation
  • Document this on docker hub in the documentation of the docker images
  • Document this in the readme of the docker images on GitHub.

As far as I undesrstand, you are already one of the committers on the icinga project and this would be a really useful way to get people into using and evaluating icinga, so I see benefits all around.

What do you think?

Error on deployment

Hi, I'm having some trouble on installing on Ubuntu 20.04.

When I execute sudo docker-compose up -d is failing on buiding incinga web image:

Created directory: /var/lib/snmp/cert_indexes
Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Running composer update ipl/stdlib
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires php 7.2.34 but your php version (7.4.28; overridden via config.platform, same as actual) does not satisfy that requirement.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.
ERROR: Service 'icingaweb' failed to build: The command '/bin/sh -c apt update     && apt install -y composer     && composer config -d /usr/share/icinga-php/ipl platform.php $(php -r 'echo PHP_VERSION;')     && composer require -d /usr/share/icinga-php/ipl ipl/stdlib:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/html:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/orm:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/sql:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/validator:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/web:dev-master     && composer update -d /usr/share/icinga-php/ipl' returned a non-zero code: 2

Full log is attached here.
Am I doing anything wrong?

Regards
icinga_docker_error.txt

How to enable the monitoring module?

I've had a good bit of time working on this one, and from what I have been able to discern, the biggest issue is that the ido database for icinga2 is not present. Without monitoring, some other modules do not work. Manually installing ido-mysql breaks other parts of the icinga2 environment, so that seems like a no go as well.

Are there any docs available for getting the monitoring module functional?

Permission error with mysql service, docker-entrypoint-initdb.d permission denied

When running the docker-compose for the first time I hit this error.

mysql_1 | ls: cannot open directory '/docker-entrypoint-initdb.d/': Permission denied

This is due to the volume mounted from ./env/mysql into /docker-entrypoint-initdb.d/. The folders env/ and env/mysql need specific permissions but were only 700 under my username when I extracted the zip file. I changed it to 775 and it now works.

Maybe worth a doc suggestion, although I notice nobody else seems to have ran into this problem so I am curious if may just be me.

icinga director not running?

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?

Error: Class 'ipl\\I18n\\GettextTranslator' not found

The container icinga/icingaweb2 is constantly restarting ...

{"log":"PHP Fatal error: Uncaught Error: Class 'ipl\I18n\GettextTranslator' not found in /usr/share/icingaweb2/library/Icinga/Application/ApplicationBootst
rap.php:710\n","stream":"stderr","time":"2021-06-08T11:32:06.940588098Z"}
{"log":"Stack trace:\n","stream":"stderr","time":"2021-06-08T11:32:06.9406087Z"}
{"log":"#0 /usr/share/icingaweb2/library/Icinga/Application/Cli.php(44): Icinga\Application\ApplicationBootstrap-\u003eprepareInternationalization()\n","str
eam":"stderr","time":"2021-06-08T11:32:06.940612701Z"}
{"log":"#1 /usr/share/icingaweb2/library/Icinga/Application/ApplicationBootstrap.php(416): Icinga\Application\Cli-\u003ebootstrap()\n","stream":"stderr","ti
me":"2021-06-08T11:32:06.940617201Z"}
{"log":"#2 /usr/share/icingaweb2/bin/icingacli(7): Icinga\Application\ApplicationBootstrap::start()\n","stream":"stderr","time":"2021-06-08T11:32:06.9406278
03Z"}
{"log":"#3 {main}\n","stream":"stderr","time":"2021-06-08T11:32:06.940632503Z"}
{"log":" thrown in /usr/share/icingaweb2/library/Icinga/Application/ApplicationBootstrap.php on line 710\n","stream":"stderr","time":"2021-06-08T11:32:06.940
635703Z"}
{"log":"[Tue Jun 8 11:32:06.945395132 2021] [docker_entrypoint:crit] [pid 1] DOCKERE: exit status 255\n","stream":"stderr","time":"2021-06-08T11:32:06.9454925
43Z"}

Docker version 20.10.7, build f0df350 on Ubuntu 20.04-LTS running your docker-compose.yml file

has been filed as issue#41 (Icinga/docker-icingaweb2#41)

solution: change image from 'icinga/icingaweb2:master' to 'icinga/icingaweb2:latest'

Feedback - Docker-Compose Playground

Greetings!

I'm mostly just here to give some feedback as a completely new user to icinga2 and my experience during setup/testing so far. At this point I have the stack running in compose the way I want and have configured e-mails, my next steps are too add a remote host and test using a custom bash script to return a check/notification, but I expect that part to be easier and less docker related so this post is mainly focused on getting the stack running in docker-compose.

I'm coming from xymon history but I'm unimpressed that xymon is hosted on sourcefourge, doesn't have a docker image and looks dated, but I do love my xymon! I saw a little comment on sourceforge/interwebs that somebody whom previously used xymon rec icinga and I gave it a go. It certainly has a beautiful UI and code on Git and a proper docker-image which checked those boxes I wanted!

As far as feedback goes:

  • I didn't like to setup of all the env vars in the compose file, it was too hard to understand what belong to where and so many repeating identical variables made it hard to understand how to change something. But, it was nice that I was able to clone/run git repo without any issues. Maybe a second playground would be what I'm suggesting as I think its preferred to have new users use the Wizard/Web-UI during setup to understand configs/components and validate options etc.
  • I have very few env vars in my compose, mostly just DB name/pass.
  • I have a separate DB container for each DB, I feel this is easier to read/understand/setup in compose and has the ability to restart/edit/mess with one DB without touching them all
  • I find many projects are moving towards just pgsql support, I might recommend going with the flow on this and at least starting to use it as default in configs, while still supporting mysql till a major version change like v3 or v4 etc.
  • I've got director setup and I'm starting to use it, but one thing I noticed is that there are no notes anywhere about getting e-mail working, I was able to get it working by simply binding msmtprc and aliases but this should be documented. I then noticed that the conf.d/ dir was full of configs that the director didn't seem to know about and the system was trying to e-mail icinga@localhost which I adjusted via CLI to be my e-mail, but this seems like should be perhaps I should clear out this directory and setup 100% via director? I'm new and haven't wiped dir yet, just something I'm thinking to try
  • I realize that you don't rec docker for prod, but many (me included) may decide that the benefits outweigh the negatives, at least initially. As well, its much easier for me to add to existing hosts vs ask mgmt for a new dedicated hardware box (big corp....). Perhaps another repo not called "playground"?
  • I struggled to get incinga2db/redis setup via UI and had to config via CLI, not sure why.
  • I like to move all env vars into .env
  • A simple note on testing API would be nice in docs, I use GET url:port/v1/objects/hosts
  • It would be nice to have a "story" setup, something like, get stack running, send forced e-mail notification test, remove/ack useless container checks that fail as they are checking inside container, add docker HOST as agent, add custom check w/ bash and have it fail/pass and notify.

Anyway, thought I'd share my configs where I ended at, let me know if I can help more/clarify any of my points etc.

Steps:

  • Run Stack and Run Web-Wizard
  • Get Setup Token
    docker exec -it icinga2-web /bin/bash -c '/usr/share/icingaweb2/bin/icingacli setup token create'
  • Get Initial Password (change later)
    docker exec -it icinga2-api /bin/bash -c 'cat /etc/icinga2/conf.d/api-users.conf'
  • Note Skip Validation w/ Redis that Icinga is connected as well as we fix after wizard
  • Edit API User and InciaDB config files and root user via UI
  • Restart Stack
  • Go to URL/config/resource and add DirectorDB As Resource
  • Restart Stack

docker-compose.yaml:

WD=/opt/icinga
#rm $WD -R
mkdir -p $WD/{setup,conf,conf/web,conf/api,conf/msmtp,sql,sql/icinga,sql/web,sql/director,redis}
cd $WD/setup

cat << 'EOF' >docker-compose.yaml 
version: '3.7'
services:

  icinga2-web:
    image: icinga/icingaweb2
    hostname: icinga2-web
    container_name: icinga2-web
    depends_on:
      - icinga2-api
      - icinga2-webdb
      - icinga2-db
      - icinga2-icingadb
      - icinga2-redis
    ports:
      - '8888:8080'
    networks:
      - icinga-net
    volumes:
      - type: volume
        source: icinga-web
        target: /data

  icinga2-web_director:
    image: icinga/icingaweb2
    command: icingacli director daemon run
    hostname: icinga2-web_director
    container_name: icinga2-web_director
    depends_on:
      - icinga2-web
    networks:
      - icinga-net
    volumes:
      - type: volume
        source: icinga-web
        target: /data

  icinga2-webdb:
    image: mariadb:10.7
#    image: postgres
    hostname: icinga2-webdb
    container_name: icinga2-webdb
    networks:
      - icinga-net
    environment:
#      - 'POSTGRES_DB=${WEB_DB_NAME}'
#      - 'POSTGRES_USER=${WEB_DB_USER}'
#      - 'POSTGRES_PASSWORD=${WEB_DB_PWD}'
#      - 'POSTGRES_ENCODING=UTF8'
 #     - 'MYSQL_ROOT_PASSWORD=${WEB_DB_PWD}'
      - 'MYSQL_RANDOM_ROOT_PASSWORD=1'
      - 'MYSQL_DATABASE=${WEB_DB_NAME}'
      - 'MYSQL_USER=${WEB_DB_USER}'
      - 'MYSQL_PASSWORD=${WEB_DB_PWD}'
    volumes:
      - type: volume
        source: icinga-webdb
        target: /var/lib/mysql

  icinga2-api:
    image: icinga/icinga2
    hostname: icinga2-api
    container_name: icinga2-api
    ports:
      - '5665:5665'
    networks:
      - icinga-net
    environment:
      - 'ICINGA_MASTER=${ICINGA_MASTER}'
    volumes:
      - type: volume
        source: icinga-api
        target: /data
      - type: bind
        source: /opt/icinga/conf/msmtp/msmtprc
        target: /etc/msmtprc
      - type: bind
        source: /opt/icinga/conf/msmtp/aliases
        target: /etc/aliases

  icinga2-icingadb:
    image: icinga/icingadb
    hostname: icinga2-icingadb
    container_name: icinga2-icingadb
    networks:
      - icinga-net
    environment:
      - 'ICINGADB_DATABASE_HOST=icinga2-db'
      - 'ICINGADB_DATABASE_PORT=${ICINGA_DB_PORT}'
      - 'ICINGADB_DATABASE_DATABASE=${ICINGA_DB_NAME}'
      - 'ICINGADB_DATABASE_USER=${ICINGA_DB_USER}'
      - 'ICINGADB_DATABASE_PASSWORD=${ICINGA_DB_PWD}'
      - 'ICINGADB_REDIS_HOST=icinga2-redis'
      - 'ICINGADB_REDIS_PORT=6380'

  icinga2-redis:
    image: redis:7.0.4
    hostname: icinga2-redis
    container_name: icinga2-redis
    command: --port 6380
    networks:
      - icinga-net
    volumes:
      - type: volume
        source: icinga-redis
        target: /data

  icinga2-db:
    image: mariadb:10.7
#    image: postgres
    hostname: icinga2-db
    container_name: icinga2-db
    networks:
      - icinga-net
    environment:
#      - 'POSTGRES_DB=${ICINGA_DB_NAME}'
#      - 'POSTGRES_USER=${ICINGA_DB_USER}'
#      - 'POSTGRES_PASSWORD=${ICINGA_DB_PWD}'
#      - 'POSTGRES_ENCODING=UTF8'
 #     - 'MYSQL_ROOT_PASSWORD=${ICINGA_DB_PWD}'
      - 'MYSQL_RANDOM_ROOT_PASSWORD=1'
      - 'MYSQL_DATABASE=${ICINGA_DB_NAME}'
      - 'MYSQL_USER=${ICINGA_DB_USER}'
      - 'MYSQL_PASSWORD=${ICINGA_DB_PWD}'
    volumes:
      - type: volume
        source: icinga-db
        target: /var/lib/mysql

  icinga2-directordb:
    image: mariadb:10.7
    command: --character-set-server=utf8 --collation-server=utf8_general_ci
#    image: postgres
    hostname: icinga2-directordb
    container_name: icinga2-directordb
    networks:
      - icinga-net
    environment:
#      - 'POSTGRES_DB=${DIRECTOR_DB_NAME}'
#      - 'POSTGRES_USER=${DIRECTOR_DB_USER}'
#      - 'POSTGRES_PASSWORD=${DIRECTOR_DB_PWD}'
#      - 'POSTGRES_ENCODING=UTF8'
 #     - 'MYSQL_ROOT_PASSWORD=${DIRECTOR_DB_PWD}'
      - 'MYSQL_RANDOM_ROOT_PASSWORD=1'
      - 'MYSQL_DATABASE=${DIRECTOR_DB_NAME}'
      - 'MYSQL_USER=${DIRECTOR_DB_USER}'
      - 'MYSQL_PASSWORD=${DIRECTOR_DB_PWD}'
    volumes:
      - type: volume
        source: icinga-directordb
        target: /var/lib/mysql

volumes:
  icinga-web:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/opt/icinga/conf/web'
  icinga-webdb:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/opt/icinga/sql/web'
  icinga-api:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/opt/icinga/conf/api'
  icinga-redis:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/opt/icinga/redis'
  icinga-db:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/opt/icinga/sql/icinga'
  icinga-directordb:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/opt/icinga/sql/director'

networks:
  icinga-net:
    driver: bridge
EOF

env:

cd $WD/setup
cat << 'EOF'>.env
TZ=America/Whitehorse

#ICINGA_CONF
ICINGA_MASTER=1

#ICINGA_WEB
WEB_DB_NAME=icinga2web
WEB_DB_USER=icinga2
WEB_DB_PWD=icinga2
WEB_DB_PORT=3306

#ICINGA_DB
ICINGA_DB_NAME=icinga2db
ICINGA_DB_USER=icinga2
ICINGA_DB_PWD=icinga2
ICINGA_DB_PORT=3306

#ICINGA_DIRECTOR
DIRECTOR_DB_NAME=icinga2director
DIRECTOR_DB_USER=icinga2
DIRECTOR_DB_PWD=icinga2
DIRECTOR_DB_PORT=3306

EOF
cat <<'EOF'>/opt/icinga/conf/api/etc/icinga2/conf.d/api-users.conf
/**
 * The ApiUser objects are used for authentication against the API.
 */
object ApiUser "root" {
  password = "icinga2"
  client_cn = "icinga2-api"

  permissions = [ "*" ]
}
EOF
cat <<'EOF'>/opt/icinga/conf/web/etc/icingaweb2/modules/icingadb/commandtransports.ini
[icinga2]
skip_validation = "0"
transport = "api"
host = "icinga2-api"
port = "5665"
username = "root"
password = "icinga2"
EOF
cat <<'EOF'>/opt/icinga/conf/api/etc/icinga2/features-available/icingadb.conf
object IcingaDB "icingadb" {
  host = "icinga2-redis"
  port = 6380
  //password = "xxx"
}
EOF
cd /opt/icinga/conf/api/etc/icinga2/features-enabled
ln -s ../features-available/icingadb.conf .
docker restart icinga2-api
docker restart icinga2-web

email:

cat <<'EOF'>msmtprc
# Set default values for all following accounts.
defaults
auth           on
tls            on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile        /var/log/msmtp.log
aliases        /etc/aliases

# Gmail
account        GMail
host           smtp.gmail.com
port           587
from           [email protected]
user           freesoftwareservers
password       PASSWD

# PLEASE SET THIS LINE
account default : GMail
EOF
chmod 755 msmtprc
cat <<'EOF'>aliases 
default : [email protected]
icinga : [email protected]
root : [email protected]
EOF
chmod 755 aliases

testing:

mailx -r [email protected] -s "MailX Test" [email protected] < /dev/null && sleep 2 && cat /var/log/msmtp.log
'/etc/icinga2/scripts/mail-service-notification.sh' '-4' '127.0.0.1' '-6' '::1' '-b' '' '-c' '' '-d' '2022-09-11 17:33:18 +0000' '-e' 'ssh' '-l' 'icinga2-api' '-n' 'icinga2-api' '-o' 'connect to address 127.0.0.1 and port 22: Connection refused' '-r' 'icinga@localhost' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'ssh' '-v' 'false'
'/etc/icinga2/scripts/mail-host-notification.sh' '-4' '127.0.0.1' '-6' '::1' '-

Here is where I keep my updated notes:

https://www.freesoftwareservers.com/display/FREES/ICINGA
https://www.freesoftwareservers.com/display/FREES/ICINGA-+Docker-Compose+-+Prod
https://www.freesoftwareservers.com/display/FREES/ICINGA+-+Docker+-+E-Mail+Setup

"Temporary failure in name resolution"

Hi all,

the compose playground does not fully come up, and the logs for icingaweb show the following messages:

[Fri May 28 17:24:38.781559702 2021] [docker_entrypoint:debug] [pid 1] DOCKERE: Checking database resource "icingaweb-mysql"
ERROR: PDOException in /usr/share/icingaweb2/modules/setup/library/Setup/Utils/DbTool.php:346 with message: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

Any ideas ?

ENV var to ini conversion

I totally love this "playground".

One thing that cost me a day of work was some strange DB configuration is not valid in the Director and vSphereDB modules after adding some LDAP resource.

Turns out that the frontend puts all resource values in double quotes. Since the entrypoint GO program is not doing this, we have to make sure to quote values in ENV vars ourselves, e.g.:

icingaweb.resources.ad-ldap.root_dn: '"dc=example,dc=com"'

How to add Icinga Director ?

Hi, to make the docker-compose fully usable it would be great if Icinga Director were also included.

What would be the better day for doing this ? Because it is not just adding a volume but also creating a db user, the corresponding db schema, enable the API connection, etc.

Thank you in advance if you find time to include this!

FATAL icingadb redis: connection pool timeout

2021-11-10T20:27:40.615Z FATAL icingadb redis: connection pool timeout
icingadb_1 | can't perform "[xread block 0 streams icinga:stats $]"
icingadb_1 | github.com/icinga/icingadb/pkg/icingaredis.WrapCmdErr
icingadb_1 | /github/workspace/pkg/icingaredis/utils.go:121
icingadb_1 | github.com/icinga/icingadb/pkg/icingaredis.(*Heartbeat).controller.func1
icingadb_1 | /github/workspace/pkg/icingaredis/heartbeat.go:104
icingadb_1 | golang.org/x/sync/errgroup.(*Group).Go.func1
icingadb_1 | /go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57
icingadb_1 | runtime.goexit
icingadb_1 | /usr/local/go/src/runtime/asm_amd64.s:1581
icingadb_1 | heartbeat failed
icingadb_1 | github.com/icinga/icingadb/pkg/icingaredis.(*Heartbeat).setError
icingadb_1 | /github/workspace/pkg/icingaredis/heartbeat.go:164
icingadb_1 | github.com/icinga/icingadb/pkg/icingaredis.(*Heartbeat).controller
icingadb_1 | /github/workspace/pkg/icingaredis/heartbeat.go:156
icingadb_1 | runtime.goexit
icingadb_1 | /usr/local/go/src/runtime/asm_amd64.s:1581
icingadb_1 | HA aborted
icingadb_1 | github.com/icinga/icingadb/pkg/icingadb.(*HA).abort.func1
icingadb_1 | /github/workspace/pkg/icingadb/ha.go:113
icingadb_1 | sync.(*Once).doSlow
icingadb_1 | /usr/local/go/src/sync/once.go:68
icingadb_1 | sync.(*Once).Do
icingadb_1 | /usr/local/go/src/sync/once.go:59
icingadb_1 | github.com/icinga/icingadb/pkg/icingadb.(*HA).abort
icingadb_1 | /github/workspace/pkg/icingadb/ha.go:111
icingadb_1 | github.com/icinga/icingadb/pkg/icingadb.(*HA).controller
icingadb_1 | /github/workspace/pkg/icingadb/ha.go:217
icingadb_1 | runtime.goexit
icingadb_1 | /usr/local/go/src/runtime/asm_amd64.s:1581
icingadb_1 | HA exited with an error
icingadb_1 | main.run
icingadb_1 | /github/workspace/cmd/icingadb/main.go:277
icingadb_1 | main.main
icingadb_1 | /github/workspace/cmd/icingadb/main.go:34
icingadb_1 | runtime.main
icingadb_1 | /usr/local/go/src/runtime/proc.go:255
icingadb_1 | runtime.goexit
icingadb_1 | /usr/local/go/src/runtime/asm_amd64.s:1581

Icinga DB not running

Hi, I'm new to Icinga and tried to run the docker-compose to get some insight on how Icinga works and if I can use it for the purpose I have in mind.

I started by running docker-compose -p icinga up as described in the README. But I'm if I login to the Icingaweg on port 8080 I'm getting the following message as red bar at the bottom:

It seems that Icinga DB is not running. Make sure Icinga DB is running and writing into the database.

Using portainer I can see every container running (except for the init-container which seems to be okay):

image

Maybe I've missed something simple, because I'm new to Icinga. Maybe you can give me a small hint on how I can resolve this issue.

By the way I was very glad to find this repository with the docker-compose files. It helps me getting started very fast. Thank you for providing this very helpful scripts and configurations 😃

container don't come up

that's not working ;-)

icinga2_1 | [2020-09-11 08:32:10 +0000] information/IcingaDB: Trying to connect to Redis server (async) on host 'icingadb-redis:6379'
icingadb_1 | time="2020-09-11T08:32:11Z" level=debug msg="translating env vars to .ini config"
icingadb_1 | time="2020-09-11T08:32:11Z" level=debug msg="checking SQL database"
icinga2_1 | [2020-09-11 08:32:11 +0000] critical/IcingaDB: Cannot connect to icingadb-redis:6379: No route to host
icingadb_1 | time="2020-09-11T08:32:12Z" level=fatal msg="dial tcp 172.19.0.5:3306: connect: no route to host"
icinga_icingadb_1 exited with code 1
icingaweb_1 | [Fri Sep 11 08:32:14.061216542 2020] [docker_entrypoint:debug] [pid 1] DOCKERE: Checking database resource "icingaweb-mysql"
icingaweb_1 | [Fri Sep 11 08:32:15.125418469 2020] [docker_entrypoint:crit] [pid 1] DOCKERE: exit status 1
icinga_icingaweb_1 exited with code 1

Include Icinga module for vSphere®

Hi,

i can enable vsphere module, create vsphere db + user. But i cant find the place where i put: /usr/bin/icingacli vspheredb daemon run

icinga2 container doesnt have icingacli installed, any hints on this?

greets

It seems that Icinga DB is not running. Make sure Icinga DB is running and writing into the database.

Hi,

I just spun up the docker-compose.yml with the corrections indicated https://github.com/lippserd/docker-compose-icinga/issues/25 but I get the following:

image

icinga_init-icinga2_1 exited with code 127 icingaweb-mysql_1 | 2022-03-05T12:19:37.418094Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. icingadb-mysql_1 | 2022-03-05T12:19:37.664320Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. icinga_icingaweb_1 exited with code 1 icingaweb_1 | [Sat Mar 5 12:19:38.724614052 2022] [docker_entrypoint:debug] [pid 1] DOCKERE: Checking database resource "icingaweb-mysql" icingaweb_1 | ERROR: PDOException in /usr/share/icingaweb2/modules/setup/library/Setup/Utils/DbTool.php:352 with message: SQLSTATE[HY000] [2002] Connection refused icingaweb_1 | [Sat Mar 5 12:19:38.761521993 2022] [docker_entrypoint:crit] [pid 1] DOCKERE: exit status 1 icingaweb_1 | [Sat Mar 5 12:19:39.722666858 2022] [docker_entrypoint:debug] [pid 1] DOCKERE: Checking database resource "icingaweb-mysql" icingaweb_1 | ERROR: PDOException in /usr/share/icingaweb2/modules/setup/library/Setup/Utils/DbTool.php:352 with message: SQLSTATE[HY000] [2002] Connection refused icingaweb_1 | [Sat Mar 5 12:19:39.75976703 2022] [docker_entrypoint:crit] [pid 1] DOCKERE: exit status 1 icinga_icingaweb_1 exited with code 1 icingaweb_1 | [Sat Mar 5 12:19:41.050324806 2022] [docker_entrypoint:debug] [pid 1] DOCKERE: Checking database resource "icingaweb-mysql" icingaweb_1 | ERROR: PDOException in /usr/share/icingaweb2/modules/setup/library/Setup/Utils/DbTool.php:352 with message: SQLSTATE[HY000] [2002] Connection refused icingaweb_1 | [Sat Mar 5 12:19:41.086066293 2022] [docker_entrypoint:crit] [pid 1] DOCKERE: exit status 1 icingaweb-mysql_1 | 2022-03-05 12:19:41+00:00 [Note] [Entrypoint]: Database files initialized icingaweb-mysql_1 | 2022-03-05 12:19:41+00:00 [Note] [Entrypoint]: Starting temporary server icingaweb-mysql_1 | 2022-03-05T12:19:41.294738Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.21) starting as process 92 icingaweb-mysql_1 | 2022-03-05T12:19:41.306023Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. icingadb-mysql_1 | 2022-03-05 12:19:41+00:00 [Note] [Entrypoint]: Database files initialized icingadb-mysql_1 | 2022-03-05 12:19:41+00:00 [Note] [Entrypoint]: Starting temporary server icingaweb-mysql_1 | 2022-03-05T12:19:41.481170Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. icingaweb-mysql_1 | 2022-03-05T12:19:41.564054Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock icinga_icingaweb_1 exited with code 1 icingadb-mysql_1 | 2022-03-05T12:19:41.631818Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.21) starting as process 92 icingadb-mysql_1 | 2022-03-05T12:19:41.642068Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. icingaweb-mysql_1 | 2022-03-05T12:19:41.697917Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. icingaweb-mysql_1 | 2022-03-05T12:19:41.698058Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. icingaweb-mysql_1 | 2022-03-05T12:19:41.700581Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. icingaweb-mysql_1 | 2022-03-05T12:19:41.714704Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.21' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL. icingaweb-mysql_1 | 2022-03-05 12:19:41+00:00 [Note] [Entrypoint]: Temporary server started. icingadb-mysql_1 | 2022-03-05T12:19:41.853311Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. icingadb-mysql_1 | 2022-03-05T12:19:41.935287Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock icingadb-mysql_1 | 2022-03-05T12:19:42.072814Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. icingadb-mysql_1 | 2022-03-05T12:19:42.072954Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. icingadb-mysql_1 | 2022-03-05T12:19:42.076203Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. icingadb-mysql_1 | 2022-03-05T12:19:42.088154Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.21' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.

can anyone help me out?

Thx.

icingaweb not building currently?

Apparently a fresh clone of this repo is not functional at the moment.

Building icingaweb
Sending build context to Docker daemon 4.608kB
Step 1/9 : FROM alpine/git
---> b8f176fa3f0d
Step 2/9 : WORKDIR /
---> Using cache
---> 1a6581fb2b43
Step 3/9 : COPY icingadb-load-monitoring.patch .
---> Using cache
---> d7054afe47ab
Step 4/9 : RUN git clone https://github.com/Icinga/icingadb-web.git icingadb && git apply --directory icingadb icingadb-load-monitoring.patch
---> Running in c33e4e401571
Cloning into 'icingadb'...
error: patch failed: icingadb/run.php:4
error: icingadb/run.php: patch does not apply
The command '/bin/sh -c git clone https://github.com/Icinga/icingadb-web.git icingadb && git apply --directory icingadb icingadb-load-monitoring.patch' returned a non-zero code: 1
ERROR: Service 'icingaweb' failed to build : Build failed

Icingaweb container not building

Hi,

I can not build the Icingaweb container with the current Dockerfile.
here is the output:

=>ERROR [stage-1 2/6] RUN apt update     && apt install -y composer     && composer require -d /usr/share/icin  14.8s 
[stage-1 2/6] RUN apt update     && apt install -y composer     && composer require -d /usr/share/icinga-php/ipl ipl/stdlib:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/html:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/orm:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/sql:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/validator:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/web:dev-master     && composer update -d /usr/share/icinga-php/ipl:
#6 0.318
#6 0.318 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#6 0.318
#6 0.411 Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
#6 0.463 Get:2 http://deb.debian.org/debian bullseye InRelease [116 kB]
#6 0.543 Get:3 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [102 kB]
#6 0.571 Get:4 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
#6 0.628 Get:5 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
#6 4.302 Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [2592 B]
#6 5.031 Fetched 8487 kB in 5s (1805 kB/s)
#6 5.031 Reading package lists...
#6 5.365 Building dependency tree...
#6 5.448 Reading state information...
#6 5.455 All packages are up to date.
#6 5.460
#6 5.460 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#6 5.460
#6 5.464 Reading package lists...
#6 5.798 Building dependency tree...
#6 5.879 Reading state information...
#6 5.959 The following additional packages will be installed:
#6 5.959   git git-man jsonlint less libcbor0 libcurl3-gnutls liberror-perl libfido2-1
#6 5.959   libxmuu1 openssh-client patch php-composer-ca-bundle php-composer-semver
#6 5.959   php-composer-spdx-licenses php-composer-xdebug-handler php-json-schema
#6 5.959   php-psr-container php-psr-log php-react-promise php-symfony-console
#6 5.959   php-symfony-filesystem php-symfony-finder php-symfony-polyfill-php80
#6 5.960   php-symfony-process php-symfony-service-contracts unzip xauth
#6 5.961 Suggested packages:
#6 5.961   fossil mercurial subversion gettext-base git-daemon-run
#6 5.961   | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs
#6 5.961   git-mediawiki git-svn keychain libpam-ssh monkeysphere ssh-askpass ed
#6 5.961   diffutils-doc php-symfony-event-dispatcher php-symfony-lock
#6 5.961   php-symfony-service-implementation zip
#6 6.043 The following NEW packages will be installed:
#6 6.043   composer git git-man jsonlint less libcbor0 libcurl3-gnutls liberror-perl
#6 6.044   libfido2-1 libxmuu1 openssh-client patch php-composer-ca-bundle
#6 6.044   php-composer-semver php-composer-spdx-licenses php-composer-xdebug-handler
#6 6.044   php-json-schema php-psr-container php-psr-log php-react-promise
#6 6.044   php-symfony-console php-symfony-filesystem php-symfony-finder
#6 6.044   php-symfony-polyfill-php80 php-symfony-process php-symfony-service-contracts
#6 6.044   unzip xauth
#6 6.347 0 upgraded, 28 newly installed, 0 to remove and 0 not upgraded.
#6 6.347 Need to get 9973 kB of archives.
#6 6.347 After this operation, 48.4 MB of additional disk space will be used.
#6 6.347 Get:1 http://deb.debian.org/debian bullseye/main amd64 less amd64 551-2 [133 kB]
#6 6.460 Get:2 http://deb.debian.org/debian bullseye/main amd64 libcbor0 amd64 0.5.0+dfsg-2 [24.0 kB]
#6 6.473 Get:3 http://deb.debian.org/debian bullseye/main amd64 libfido2-1 amd64 1.6.0-2 [53.3 kB]
#6 6.497 Get:4 http://deb.debian.org/debian bullseye/main amd64 openssh-client amd64 1:8.4p1-5 [929 kB]
#6 6.945 Get:5 http://deb.debian.org/debian bullseye/main amd64 php-composer-ca-bundle all 1.2.9-1 [11.0 kB]
#6 6.971 Get:6 http://deb.debian.org/debian bullseye/main amd64 php-composer-semver all 3.2.4-2 [20.4 kB]
#6 6.971 Get:7 http://deb.debian.org/debian bullseye/main amd64 php-composer-spdx-licenses all 1.5.5-2 [13.3 kB]
#6 6.977 Get:8 http://deb.debian.org/debian bullseye/main amd64 php-psr-log all 1.1.3-2 [9232 B]
#6 6.984 Get:9 http://deb.debian.org/debian bullseye/main amd64 php-composer-xdebug-handler all 1.4.5-1 [16.9 kB]
#6 6.993 Get:10 http://deb.debian.org/debian bullseye/main amd64 php-json-schema all 5.2.10-2 [37.8 kB]
#6 7.006 Get:11 http://deb.debian.org/debian bullseye/main amd64 jsonlint all 1.8.3-2 [13.5 kB]
#6 7.016 Get:12 http://deb.debian.org/debian bullseye/main amd64 php-symfony-polyfill-php80 all 1.22.1-1 [9976 B]
#6 7.017 Get:13 http://deb.debian.org/debian bullseye/main amd64 php-psr-container all 1.0.0-2 [3436 B]
#6 7.023 Get:14 http://deb.debian.org/debian bullseye/main amd64 php-symfony-service-contracts all 1.1.10-2 [8052 B]
#6 7.025 Get:15 http://deb.debian.org/debian bullseye/main amd64 php-symfony-console all 4.4.19+dfsg-2 [82.7 kB]
#6 7.064 Get:16 http://deb.debian.org/debian bullseye/main amd64 php-symfony-filesystem all 4.4.19+dfsg-2 [26.1 kB]
#6 7.075 Get:17 http://deb.debian.org/debian bullseye/main amd64 php-symfony-finder all 4.4.19+dfsg-2 [31.4 kB]
#6 7.086 Get:18 http://deb.debian.org/debian bullseye/main amd64 php-symfony-process all 4.4.19+dfsg-2 [36.3 kB]
#6 7.109 Get:19 http://deb.debian.org/debian bullseye/main amd64 php-react-promise all 2.7.0-2 [18.6 kB]
#6 7.115 Get:20 http://deb.debian.org/debian bullseye/main amd64 composer all 2.0.9-2 [407 kB]
#6 7.380 Get:21 http://deb.debian.org/debian bullseye/main amd64 libcurl3-gnutls amd64 7.74.0-1.3+deb11u1 [338 kB]
#6 7.514 Get:22 http://deb.debian.org/debian bullseye/main amd64 liberror-perl all 0.17029-1 [31.0 kB]
#6 7.525 Get:23 http://deb.debian.org/debian bullseye/main amd64 git-man all 1:2.30.2-1 [1827 kB]
#6 8.343 Get:24 http://deb.debian.org/debian bullseye/main amd64 git amd64 1:2.30.2-1 [5527 kB]
#6 10.91 Get:25 http://deb.debian.org/debian bullseye/main amd64 libxmuu1 amd64 2:1.1.2-2+b3 [23.9 kB]
#6 10.92 Get:26 http://deb.debian.org/debian bullseye/main amd64 patch amd64 2.7.6-7 [128 kB]
#6 10.98 Get:27 http://deb.debian.org/debian bullseye/main amd64 unzip amd64 6.0-26 [171 kB]
#6 11.06 Get:28 http://deb.debian.org/debian bullseye/main amd64 xauth amd64 1:1.1-1 [40.5 kB]
#6 11.17 debconf: delaying package configuration, since apt-utils is not installed
#6 11.20 Fetched 9973 kB in 5s (1983 kB/s)
#6 11.24 Selecting previously unselected package less.
(Reading database ... 19020 files and directories currently installed.)
#6 11.25 Preparing to unpack .../00-less_551-2_amd64.deb ...
#6 11.25 Unpacking less (551-2) ...
#6 11.34 Selecting previously unselected package libcbor0:amd64.
#6 11.34 Preparing to unpack .../01-libcbor0_0.5.0+dfsg-2_amd64.deb ...
#6 11.36 Unpacking libcbor0:amd64 (0.5.0+dfsg-2) ...
#6 11.42 Selecting previously unselected package libfido2-1:amd64.
#6 11.42 Preparing to unpack .../02-libfido2-1_1.6.0-2_amd64.deb ...
#6 11.43 Unpacking libfido2-1:amd64 (1.6.0-2) ...
#6 11.50 Selecting previously unselected package openssh-client.
#6 11.50 Preparing to unpack .../03-openssh-client_1%3a8.4p1-5_amd64.deb ...
#6 11.51 Unpacking openssh-client (1:8.4p1-5) ...
#6 11.62 Selecting previously unselected package php-composer-ca-bundle.
#6 11.62 Preparing to unpack .../04-php-composer-ca-bundle_1.2.9-1_all.deb ...
#6 11.63 Unpacking php-composer-ca-bundle (1.2.9-1) ...
#6 11.68 Selecting previously unselected package php-composer-semver.
#6 11.68 Preparing to unpack .../05-php-composer-semver_3.2.4-2_all.deb ...
#6 11.69 Unpacking php-composer-semver (3.2.4-2) ...
#6 11.73 Selecting previously unselected package php-composer-spdx-licenses.
#6 11.73 Preparing to unpack .../06-php-composer-spdx-licenses_1.5.5-2_all.deb ...
#6 11.74 Unpacking php-composer-spdx-licenses (1.5.5-2) ...
#6 11.79 Selecting previously unselected package php-psr-log.
#6 11.79 Preparing to unpack .../07-php-psr-log_1.1.3-2_all.deb ...
#6 11.80 Unpacking php-psr-log (1.1.3-2) ...
#6 11.84 Selecting previously unselected package php-composer-xdebug-handler.
#6 11.84 Preparing to unpack .../08-php-composer-xdebug-handler_1.4.5-1_all.deb ...
#6 11.84 Unpacking php-composer-xdebug-handler (1.4.5-1) ...
#6 11.89 Selecting previously unselected package php-json-schema.
#6 11.89 Preparing to unpack .../09-php-json-schema_5.2.10-2_all.deb ...
#6 11.89 Unpacking php-json-schema (5.2.10-2) ...
#6 11.94 Selecting previously unselected package jsonlint.
#6 11.94 Preparing to unpack .../10-jsonlint_1.8.3-2_all.deb ...
#6 11.95 Unpacking jsonlint (1.8.3-2) ...
#6 11.99 Selecting previously unselected package php-symfony-polyfill-php80.
#6 12.00 Preparing to unpack .../11-php-symfony-polyfill-php80_1.22.1-1_all.deb ...
#6 12.00 Unpacking php-symfony-polyfill-php80 (1.22.1-1) ...
#6 12.05 Selecting previously unselected package php-psr-container.
#6 12.05 Preparing to unpack .../12-php-psr-container_1.0.0-2_all.deb ...
#6 12.06 Unpacking php-psr-container (1.0.0-2) ...
#6 12.10 Selecting previously unselected package php-symfony-service-contracts.
#6 12.10 Preparing to unpack .../13-php-symfony-service-contracts_1.1.10-2_all.deb ...
#6 12.11 Unpacking php-symfony-service-contracts (1.1.10-2) ...
#6 12.15 Selecting previously unselected package php-symfony-console.
#6 12.15 Preparing to unpack .../14-php-symfony-console_4.4.19+dfsg-2_all.deb ...
#6 12.16 Unpacking php-symfony-console (4.4.19+dfsg-2) ...
#6 12.22 Selecting previously unselected package php-symfony-filesystem.
#6 12.22 Preparing to unpack .../15-php-symfony-filesystem_4.4.19+dfsg-2_all.deb ...
#6 12.23 Unpacking php-symfony-filesystem (4.4.19+dfsg-2) ...
#6 12.27 Selecting previously unselected package php-symfony-finder.
#6 12.27 Preparing to unpack .../16-php-symfony-finder_4.4.19+dfsg-2_all.deb ...
#6 12.28 Unpacking php-symfony-finder (4.4.19+dfsg-2) ...
#6 12.33 Selecting previously unselected package php-symfony-process.
#6 12.33 Preparing to unpack .../17-php-symfony-process_4.4.19+dfsg-2_all.deb ...
#6 12.34 Unpacking php-symfony-process (4.4.19+dfsg-2) ...
#6 12.38 Selecting previously unselected package php-react-promise.
#6 12.39 Preparing to unpack .../18-php-react-promise_2.7.0-2_all.deb ...
#6 12.39 Unpacking php-react-promise (2.7.0-2) ...
#6 12.44 Selecting previously unselected package composer.
#6 12.44 Preparing to unpack .../19-composer_2.0.9-2_all.deb ...
#6 12.45 Unpacking composer (2.0.9-2) ...
#6 12.54 Selecting previously unselected package libcurl3-gnutls:amd64.
#6 12.54 Preparing to unpack .../20-libcurl3-gnutls_7.74.0-1.3+deb11u1_amd64.deb ...
#6 12.55 Unpacking libcurl3-gnutls:amd64 (7.74.0-1.3+deb11u1) ...
#6 12.61 Selecting previously unselected package liberror-perl.
#6 12.61 Preparing to unpack .../21-liberror-perl_0.17029-1_all.deb ...
#6 12.62 Unpacking liberror-perl (0.17029-1) ...
#6 12.66 Selecting previously unselected package git-man.
#6 12.66 Preparing to unpack .../22-git-man_1%3a2.30.2-1_all.deb ...
#6 12.67 Unpacking git-man (1:2.30.2-1) ...
#6 12.81 Selecting previously unselected package git.
#6 12.81 Preparing to unpack .../23-git_1%3a2.30.2-1_amd64.deb ...
#6 12.82 Unpacking git (1:2.30.2-1) ...
#6 13.27 Selecting previously unselected package libxmuu1:amd64.
#6 13.27 Preparing to unpack .../24-libxmuu1_2%3a1.1.2-2+b3_amd64.deb ...
#6 13.28 Unpacking libxmuu1:amd64 (2:1.1.2-2+b3) ...
#6 13.33 Selecting previously unselected package patch.
#6 13.33 Preparing to unpack .../25-patch_2.7.6-7_amd64.deb ...
#6 13.34 Unpacking patch (2.7.6-7) ...
#6 13.40 Selecting previously unselected package unzip.
#6 13.40 Preparing to unpack .../26-unzip_6.0-26_amd64.deb ...
#6 13.41 Unpacking unzip (6.0-26) ...
#6 13.46 Selecting previously unselected package xauth.
#6 13.47 Preparing to unpack .../27-xauth_1%3a1.1-1_amd64.deb ...
#6 13.47 Unpacking xauth (1:1.1-1) ...
#6 13.53 Setting up php-symfony-finder (4.4.19+dfsg-2) ...
#6 13.56 Setting up jsonlint (1.8.3-2) ...
#6 13.58 Setting up unzip (6.0-26) ...
#6 13.61 Setting up php-psr-container (1.0.0-2) ...
#6 13.63 Setting up libcbor0:amd64 (0.5.0+dfsg-2) ...
#6 13.66 Setting up less (551-2) ...
#6 13.69 Setting up php-symfony-service-contracts (1.1.10-2) ...
#6 13.71 Setting up libcurl3-gnutls:amd64 (7.74.0-1.3+deb11u1) ...
#6 13.74 Setting up liberror-perl (0.17029-1) ...
#6 13.76 Setting up php-composer-ca-bundle (1.2.9-1) ...
#6 13.78 Setting up php-symfony-process (4.4.19+dfsg-2) ...
#6 13.81 Setting up php-symfony-filesystem (4.4.19+dfsg-2) ...
#6 13.83 Setting up patch (2.7.6-7) ...
#6 13.86 Setting up php-react-promise (2.7.0-2) ...
#6 13.88 Setting up php-psr-log (1.1.3-2) ...
#6 13.90 Setting up php-symfony-polyfill-php80 (1.22.1-1) ...
#6 13.92 Setting up php-composer-semver (3.2.4-2) ...
#6 13.94 Setting up git-man (1:2.30.2-1) ...
#6 13.97 Setting up php-json-schema (5.2.10-2) ...
#6 13.99 Setting up libfido2-1:amd64 (1.6.0-2) ...
#6 14.01 Setting up php-composer-spdx-licenses (1.5.5-2) ...
#6 14.04 Setting up libxmuu1:amd64 (2:1.1.2-2+b3) ...
#6 14.06 Setting up php-symfony-console (4.4.19+dfsg-2) ...
#6 14.08 Setting up php-composer-xdebug-handler (1.4.5-1) ...
#6 14.11 Setting up openssh-client (1:8.4p1-5) ...
#6 14.21 Setting up git (1:2.30.2-1) ...
#6 14.25 Setting up xauth (1:1.1-1) ...
#6 14.27 Setting up composer (2.0.9-2) ...
#6 14.30 Processing triggers for libc-bin (2.31-13+deb11u2) ...
#6 14.33 Processing triggers for mailcap (3.69) ...
#6 14.39 Created directory: /var/lib/snmp/cert_indexes
#6 14.45 Do not run Composer as root/super user! See https://getcomposer.org/root for details
#6 14.70
#6 14.70 In InitCommand.php line 749:
#6 14.70
#6 14.70   Package ipl/stdlib at version dev-master has a PHP requirement incompatible
#6 14.70    with your PHP version, PHP extensions and Composer version
#6 14.70
#6 14.70
#6 14.70 require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-scripts] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]
#6 14.70
------
executor failed running [/bin/sh -c apt update     && apt install -y composer     && composer require -d /usr/share/icinga-php/ipl ipl/stdlib:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/html:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/orm:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/sql:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/validator:dev-master     && composer require -d /usr/share/icinga-php/ipl ipl/web:dev-master     && composer update -d /usr/share/icinga-php/ipl]: exit code: 1

Icingadb and Redis not running

Looks similar to #30 but "ICINGA_REDIS_DDRESS: icingadb-redis:6379" is changed to "ICINGADB_REDIS_HOST: icingadb-redis."

The log-file of the icingadb-container indicate a problem while connecting to redis:

github.com/icinga/icingadb/pkg/driver.RetryConnector.Connect.func2
	/go/pkg/mod/github.com/icinga/[email protected]/pkg/driver/driver.go:44
github.com/icinga/icingadb/pkg/retry.WithBackoff
	/go/pkg/mod/github.com/icinga/[email protected]/pkg/retry/retry.go:52
github.com/icinga/icingadb/pkg/driver.RetryConnector.Connect
	/go/pkg/mod/github.com/icinga/[email protected]/pkg/driver/driver.go:32
database/sql.(*DB).conn
	/usr/local/go/src/database/sql/sql.go:1395
database/sql.(*DB).query
	/usr/local/go/src/database/sql/sql.go:1732
database/sql.(*DB).QueryContext
	/usr/local/go/src/database/sql/sql.go:1710
database/sql.(*DB).Query
	/usr/local/go/src/database/sql/sql.go:1728
main.dbHasSchema
	/entrypoint/main.go:153
main.initDb
	/entrypoint/main.go:104
main.runDaemon
	/entrypoint/main.go:75
�
n
	/entrypoint/main.go:36
�
runtime.main
	/usr/local/go/src/runtime/proc.go:250
2023-02-14T11:07:17.787Z	INFO	driver/driver.go:49	Reconnected to database	{"after": "593.19301ms", "attempts": 4}
2023-02-14T11:07:17.789Z	DEBUG	entrypoint/main.go:79	starting actual daemon via exec(3)
2023-02-14T11:07:17.867Z	INFO	icingadb	Starting Icinga DB
2023-02-14T11:07:17.867Z	INFO	icingadb	Connecting to database at 'mysql:3306'
2023-02-14T11:07:17.875Z	INFO	icingadb	Connecting to Redis at 'icingadb-redis:6379'
2023-02-14T11:07:20.878Z	INFO	icingadb	Waiting for Icinga 2 to write into Redis, please make sure you have started Icinga 2 and the Icinga DB feature is enabled
2023-03-06T06:50:01.758Z	WARN	redis	Can't connect to Redis. Retrying	{"error": "dial tcp 172.19.0.2:6379: connect: connection refused"}
2023-03-06T06:50:02.884Z	INFO	redis	Reconnected to Redis	{"after": "1.126900298s", "attempts": 8}
"

IncingaWeb won't start because of missing mysql schema

If I deploy the docker-compose file, icinga web will be exit with error code 1. It seems there is the schema file missing:

icingaweb_1 | [Sun Jan 29 12:40:41.274446306 2023] [docker_entrypoint:debug] [pid 1] DOCKERE: Checking database resource "icingaweb-mysql" icingaweb_1 | [Sun Jan 29 12:40:41.320286678 2023] [docker_entrypoint:debug] [pid 1] DOCKERE: Importing schema into database resource "icingaweb-mysql" icingaweb_1 | ERROR: RuntimeException in /usr/share/icingaweb2/library/Icinga/Util/File.php:39 with message: SplFileObject::__construct(/usr/share/icingaweb2/etc/schema/mysql.schema.sql): failed to open stream: No such file or directory icingaweb_1 | [Sun Jan 29 12:40:41.365987191 2023] [docker_entrypoint:crit] [pid 1] DOCKERE: exit status 1

docker compose fails due to php requirement

Hi, docker compose fails with the following error:

#0 14.68 Your requirements could not be resolved to an installable set of packages.
#0 14.68
#0 14.68 Problem 1
#0 14.68 - Root composer.json requires php 7.2.34 but your php version (7.4.28; overridden via config.platform, same as actual) does not satisfy that requirement.
#0 14.68
#0 14.68
#0 14.68 Installation failed, reverting ./composer.json and ./composer.lock to their original content.

failed to solve: executor failed running [/bin/sh -c apt update && apt install -y composer && composer config -d /usr/share/icinga-php/ipl platform.php $(php -r 'echo PHP_VERSION;') && composer require -d /usr/share/icinga-php/ipl ipl/stdlib:dev-master && composer require -d /usr/share/icinga-php/ipl ipl/html:dev-master && composer require -d /usr/share/icinga-php/ipl ipl/orm:dev-master && composer require -d /usr/share/icinga-php/ipl ipl/sql:dev-master && composer require -d /usr/share/icinga-php/ipl ipl/validator:dev-master && composer require -d /usr/share/icinga-php/ipl ipl/web:dev-master && composer update -d /usr/share/icinga-php/ipl]: exit code: 2

Anybody solved this one or has a workaround?

possible css issue with current version

It looks like there is a css problem, not sure if this is an icinga issue or something that can be addressed with this docker-compose example.

I pruned images and volumes, also tried this on linux and OS X.

Thanks!
Screen Shot 2022-02-15 at 2 54 33 PM
Screen Shot 2022-02-15 at 2 55 06 PM

Icingaweb shows nothing

Hi,
since yesterday i can't see hosts, services and so on in icingaweb. If i run "icinga deamon -C" it confirms that there is a valid configuration. I tried to restart from zero but nothing changed.
Thank you
nothing
set

Icingacli checks

BTW.: do you have a good idea for icingacli checks? As web and icinga are splitted, the checks can't run as there is no icingacli.

Maybe a Phar of the icingacli plus configuration deployed to the Icinga container. But I don't know if creating the Phar works that easily.

Originally posted by @lippserd in #17 (comment)

I just had an idea how to run such tests.
As there is a by_ssh command, that runs commands on a remote server by ssh, we could implement a by_docker command that can run check commands inside an existing container by docker exec icingaweb icingacli ... or by creating a new container with a custom check command docker run --rm check_xy_image.

Therefore the docker cli in the icinga2 image and the docker socket of the host of the icinga2 service or a ssh/tls DOCKERHOST is required.

Its not perfect for all hosting environments but the best solution for common.

persistence of resources.ini for icingaweb

when I create an ldap or a new resource from the interface Configuration/Application/Resources. When I restart the container all is gone. how to make this config persisitent?
I already tested the modification by hand of the resources.ini in both /etc/icinagaweb2/ and /data/etc/icinagaweb2, nothing! config disappears once the container restarts!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.