Icinga / docker-icingaweb2

GNU General Public License v2.0
16 stars 11 forks source link

how can run instance in ubuntu 20 #96

Closed johnfelipe closed 2 years ago

johnfelipe commented 2 years ago
docker run --rm -d \
    -p 8080:8080 \
    -v icingaweb:/data \
    -e icingaweb.enabledModules=icingadb,ipl \
    -e icingaweb.passwords.icingaweb2.icingaadmin=123456 \
    -e icingaweb.authentication.icingaweb2.backend=db \
    -e icingaweb.authentication.icingaweb2.resource=icingaweb_db \
    -e icingaweb.config.global.config_backend=db \
    -e icingaweb.config.global.config_resource=icingaweb_db \
    -e icingaweb.config.logging.log=php \
    -e icingaweb.groups.icingaweb2.backend=db \
    -e icingaweb.groups.icingaweb2.resource=icingaweb_db \
    -e icingaweb.modules.icingadb.config.icingadb.resource=icingadb \
    -e icingaweb.modules.icingadb.redis.redis1.host=2001:db8::192.0.2.18 \
    -e icingaweb.modules.icingadb.redis.redis1.port=6379 \
    -e icingaweb.modules.icingadb.commandtransports.icinga2.transport=api \
    -e icingaweb.modules.icingadb.commandtransports.icinga2.host=2001:db8::192.0.2.9 \
    -e icingaweb.modules.icingadb.commandtransports.icinga2.username=root \
    -e icingaweb.modules.icingadb.commandtransports.icinga2.password=123456 \
    -e icingaweb.resources.icingaweb_db.type=db \
    -e icingaweb.resources.icingaweb_db.db=mysql \
    -e icingaweb.resources.icingaweb_db.host=2001:db8::192.0.2.13 \
    -e icingaweb.resources.icingaweb_db.dbname=icingaweb \
    -e icingaweb.resources.icingaweb_db.username=icingaweb \
    -e icingaweb.resources.icingaweb_db.password=123456 \
    -e icingaweb.resources.icingaweb_db.charset=utf8mb4 \
    -e icingaweb.resources.icingadb.type=db \
    -e icingaweb.resources.icingadb.db=mysql \
    -e icingaweb.resources.icingadb.host=2001:db8::192.0.2.113 \
    -e icingaweb.resources.icingadb.dbname=icingadb \
    -e icingaweb.resources.icingadb.username=icingaweb \
    -e icingaweb.resources.icingadb.password=123456 \
    -e icingaweb.resources.icingadb.charset=utf8mb4 \
    -e icingaweb.roles.Administrators.users=icingaadmin \
    -e icingaweb.roles.Administrators.permissions='*' \
    -e icingaweb.roles.Administrators.groups=Administrators \
    icinga/icingaweb2

and show me this:


Unable to find image 'icinga/icingaweb2:latest' locally
latest: Pulling from icinga/icingaweb2
b85a868b505f: Pull complete
b0bd7a9e24c4: Pull complete
5647e980b8c6: Pull complete
7e0bfbca9f4b: Pull complete
cfe6b8223551: Pull complete
359a95475ca7: Pull complete
3c1c533318a1: Pull complete
f61faed11b5a: Pull complete
ffc4bc8c9dee: Pull complete
3ec561eec184: Pull complete
ea90a9fc993b: Pull complete
e6866ec0105e: Pull complete
44cb3e3c60c6: Pull complete
8ba7eca56adc: Pull complete
9c67f3df0416: Pull complete
4334255e96f8: Pull complete
2b23632b7e08: Pull complete
27c539be78bd: Pull complete
166f6e839a0a: Pull complete
Digest: sha256:25317508d28ee0980478693171fe6c2a7298d5d55512638cc738490103e62a60
Status: Downloaded newer image for icinga/icingaweb2:latest
b7c7cf120365c5c2aa4f12e18e59f2f7a8f65ecb565ea808674f92b649c11d2d

then i put this command

docker run --rm -v icingaweb:/data icinga/icingaweb2 icingacli setup token create

and show this errors:

[Wed Aug 24 16:29:17.979644448 2022] [docker_entrypoint:info] [pid 1] DOCKERE: Initializing /data as we're the init process
[Wed Aug 24 16:29:17.982984526 2022] [docker_entrypoint:debug] [pid 1] DOCKERE: Creating "/data/etc/icingaweb2/enabledModules"
[Wed Aug 24 16:29:17.98307641 2022] [docker_entrypoint:debug] [pid 1] DOCKERE: Creating "/data/var/lib/icingaweb2"
[Wed Aug 24 16:29:17.983101471 2022] [docker_entrypoint:debug] [pid 1] DOCKERE: Translating env vars to .ini config
[Wed Aug 24 16:29:17.983197167 2022] [docker_entrypoint:info] [pid 1] DOCKERE: Checking database resources used as backends
Found invalid module in enabledModule directory "/data/etc/icingaweb2/enabledModules": "/data/etc/icingaweb2/enabledModules/ipl" points to non existing path "false"
[Wed Aug 24 16:29:18.194492958 2022] [docker_entrypoint:debug] [pid 1] DOCKERE: Checking database resource "icingaweb_db"
Found invalid module in enabledModule directory "/data/etc/icingaweb2/enabledModules": "/data/etc/icingaweb2/enabledModules/ipl" points to non existing path "false"
ERROR: PDOException in /usr/share/icingaweb2/modules/setup/library/Setup/Utils/DbTool.php:352 with message: SQLSTATE[HY000] [2002] Connection timed out
[Wed Aug 24 16:29:20.251855194 2022] [docker_entrypoint:crit] [pid 1] DOCKERE: exit status 1

what im missing here?

johnfelipe commented 2 years ago

Anyone?

julianbrost commented 2 years ago

All these -e parameters give some example configuration. You have to adapt these to your setup.

Additionally, there's some outdated information in the README and icingaweb.enabledModules should no longer include ipl, see also #87.

lippserd commented 2 years ago

Use this one https://github.com/lippserd/docker-compose-icinga.

johnfelipe commented 2 years ago

Pls update readme markdown file asap

johnfelipe commented 2 years ago

Use this one https://github.com/lippserd/docker-compose-icinga.

Ok I will do it Monday and let's try I need monitor and alert for vmware infraestructure. Tnks a lot.