From a9035d2b00c5e431d544edd174b8f650b4fb17e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Thu, 1 Feb 2024 11:52:47 +0100 Subject: [PATCH] Add: Add a section on how to access the logs of the community containers Explain in detail how to get log messages from our software stack when running the community containers. --- src/22.4/container/troubleshooting.md | 58 +++++++++++++++++++++++++++ src/changelog.md | 1 + 2 files changed, 59 insertions(+) diff --git a/src/22.4/container/troubleshooting.md b/src/22.4/container/troubleshooting.md index fe660004..9d7a78f1 100644 --- a/src/22.4/container/troubleshooting.md +++ b/src/22.4/container/troubleshooting.md @@ -2,6 +2,64 @@ This page contains hints for troubleshooting Greenbone Community Container specific issues. +### Facing an issue with the Greenbone Community Containers + +If you have an issue with the Greenbone Community Containers because something +doesn't work as expected and/or you are getting an error in the web UI it is +necessary to check the log output to get some technical hints about the issue. + +To inspect the logs you can use the [`docker compose logs`](https://docs.docker.com/engine/reference/commandline/compose_logs/) +command. For displaying the complete log output you can run + +```{code-block} shell +--- +caption: Display all logs +--- +docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition \ + logs +``` + +To follow the current log output to display log messages as they occur use the +following command + +```{code-block} shell +--- +caption: Follow current log output +--- +docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition \ + logs -f +``` + +It's also possible to just display the logs of a specific container by using +`docker compose logs ` where service is the [name of the container +within the docker compose file](./index.md#description). + +```{code-block} shell +--- +caption: Follow the log messages of the gvmd container only +--- +docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition \ + logs -f gvmd +``` + +Additionally it is possible to bypass the `docker compose log` command and +access the log files directly. For example run the following command to display +the content of the OpenVAS scanner log file via {command}`cat` + +```{code-block} shell +--- +caption: Print messages from /var/log/gvm/openvas.log +--- +docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition \ + exec ospd-openvas cat /var/log/gvm/openvas.log +``` + +Afterwards using the collected error messages in the [search of our Community Forum](https://forum.greenbone.net/search) +may bring up possible results to resolve the issue already. + +If no fitting results can be found feel free to create a new topic the +[Community Containers category in our Community Forum](https://forum.greenbone.net/c/community-containers/40). + ### VTs are up-to-date but not visible on the web interface It may be possible, especially for the initial synchronization, that the scanner diff --git a/src/changelog.md b/src/changelog.md index 9605d201..1ec6fd7c 100644 --- a/src/changelog.md +++ b/src/changelog.md @@ -12,6 +12,7 @@ and this project adheres to [Calendar Versioning](https://calver.org). * Add a disclaimer that Greenbone isn't involved in packaging for Kali Linux * Move `Facing an issue with the Greenbone Community Edition` section from source build troubleshooting to generic troubleshooting page +* Add section about getting the log messages for the Community Containers * Update gvm-libs to 22.8.0 * Update gvmd to 23.2.0 * Update pg-gvm to 22.6.4