Install checkmk Docker: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(11 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 4: Zeile 4:
 
*mkdir -p omd-sites
 
*mkdir -p omd-sites
  
=Dockercompose File=
+
=Docker Compose File=
*cat docker-compose.yml
+
*nano docker-compose.yml
 
<pre>
 
<pre>
version: '3.1'
 
 
services:
 
services:
   controll:
+
   checkmk:
     image: checkmk/check-mk-raw:2.0.0-latest
+
     image: checkmk/check-mk-raw:2.3.0-latest
 +
    container_name: checkmk
 +
    restart: always
 
     tmpfs:
 
     tmpfs:
    - /opt/omd/sites/cmk/tmp:uid=1000,gid=1000
+
      - /opt/omd/sites/cmk/tmp:uid=1000,gid=1000
 
     ulimits:
 
     ulimits:
       nofile: 1024
+
       nofile: 49152
    container_name: checkmk
 
    restart: always
 
 
     volumes:
 
     volumes:
       - '/etc/localtime:/etc/localtime:ro'
+
       - /etc/localtime:/etc/localtime:ro
       - './odm-sites:/omd/sites'
+
       - ./omd-sites:/omd/sites
 
     ports:
 
     ports:
       - '8095:5000'
+
       - "8095:5000"
       - '6557:6557'
+
       - "6557:6557"
 
</pre>
 
</pre>
  
 
=Starten manuell=
 
=Starten manuell=
*docker-compose up -d
+
*docker compose up -d
  
 
=Stoppen manuell=
 
=Stoppen manuell=
*cd /root/docker/checkmk/
+
*docker compose down
*docker-compse down
+
 
=Password checken=
+
=Passwort checken=
*docker container logs monitoring
+
*docker container logs checkmk
Created new site cmk with version 2.0.0.cre.
+
Created new site cmk with version 2.3.0.cre.
  
 
   The site can be started with omd start cmk.
 
   The site can be started with omd start cmk.
   The default web UI is available at http://73a86e310b60/cmk/
+
   The default web UI is available at http://<container_id>/cmk/
  
   The admin user for the web applications is cmkadmin with password: 2JLysBmv
+
   The admin user for the web applications is cmkadmin with password: <zufälliges_passwort>
 
   For command line administration of the site, log in with 'omd su cmk'.
 
   For command line administration of the site, log in with 'omd su cmk'.
 
   After logging in, you can change the password for cmkadmin with 'htpasswd etc/htpasswd cmkadmin'.
 
   After logging in, you can change the password for cmkadmin with 'htpasswd etc/htpasswd cmkadmin'.
  
=cmkadmin passwort setzen=
+
=cmkadmin Passwort setzen=
 
*docker exec -it checkmk /bin/bash
 
*docker exec -it checkmk /bin/bash
 
*su - cmk
 
*su - cmk
*<nowiki>OMD[cmk]:>#~$</nowiki> htpasswd -m ~/etc/htpasswd cmkadmin
+
*OMD[cmk]:~$ cmk-passwd cmkadmin
 
*exit
 
*exit
*exit
 
 
=Todo=
 
*certbot
 
*letsencrypt
 
*reverseproxy
 

Aktuelle Version vom 16. September 2025, 17:07 Uhr

Verzeichnisse anlegen

  • mkdir -p docker/checkmk
  • cd docker/checkmk
  • mkdir -p omd-sites

Docker Compose File

  • nano docker-compose.yml
services:
  checkmk:
    image: checkmk/check-mk-raw:2.3.0-latest
    container_name: checkmk
    restart: always
    tmpfs:
      - /opt/omd/sites/cmk/tmp:uid=1000,gid=1000
    ulimits:
      nofile: 49152
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./omd-sites:/omd/sites
    ports:
      - "8095:5000"
      - "6557:6557"

Starten manuell

  • docker compose up -d

Stoppen manuell

  • docker compose down

Passwort checken

  • docker container logs checkmk

Created new site cmk with version 2.3.0.cre.

 The site can be started with omd start cmk.
 The default web UI is available at http://<container_id>/cmk/
 The admin user for the web applications is cmkadmin with password: <zufälliges_passwort>
 For command line administration of the site, log in with 'omd su cmk'.
 After logging in, you can change the password for cmkadmin with 'htpasswd etc/htpasswd cmkadmin'.

cmkadmin Passwort setzen

  • docker exec -it checkmk /bin/bash
  • su - cmk
  • OMD[cmk]:~$ cmk-passwd cmkadmin
  • exit