Skip to content

Commit

Permalink
Add: Add a section on how to access the logs of the community containers
Browse files Browse the repository at this point in the history
Explain in detail how to get log messages from our software stack when
running the community containers.
  • Loading branch information
bjoernricks authored and greenbonebot committed Feb 1, 2024
1 parent 72b2b52 commit a9035d2
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
58 changes: 58 additions & 0 deletions src/22.4/container/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <service>` 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
Expand Down
1 change: 1 addition & 0 deletions src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a9035d2

Please sign in to comment.