Skip to content

Commit a9035d2

Browse files
bjoernricksgreenbonebot
authored andcommitted
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.
1 parent 72b2b52 commit a9035d2

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

src/22.4/container/troubleshooting.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,64 @@
22

33
This page contains hints for troubleshooting Greenbone Community Container specific issues.
44

5+
### Facing an issue with the Greenbone Community Containers
6+
7+
If you have an issue with the Greenbone Community Containers because something
8+
doesn't work as expected and/or you are getting an error in the web UI it is
9+
necessary to check the log output to get some technical hints about the issue.
10+
11+
To inspect the logs you can use the [`docker compose logs`](https://docs.docker.com/engine/reference/commandline/compose_logs/)
12+
command. For displaying the complete log output you can run
13+
14+
```{code-block} shell
15+
---
16+
caption: Display all logs
17+
---
18+
docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition \
19+
logs
20+
```
21+
22+
To follow the current log output to display log messages as they occur use the
23+
following command
24+
25+
```{code-block} shell
26+
---
27+
caption: Follow current log output
28+
---
29+
docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition \
30+
logs -f
31+
```
32+
33+
It's also possible to just display the logs of a specific container by using
34+
`docker compose logs <service>` where service is the [name of the container
35+
within the docker compose file](./index.md#description).
36+
37+
```{code-block} shell
38+
---
39+
caption: Follow the log messages of the gvmd container only
40+
---
41+
docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition \
42+
logs -f gvmd
43+
```
44+
45+
Additionally it is possible to bypass the `docker compose log` command and
46+
access the log files directly. For example run the following command to display
47+
the content of the OpenVAS scanner log file via {command}`cat`
48+
49+
```{code-block} shell
50+
---
51+
caption: Print messages from /var/log/gvm/openvas.log
52+
---
53+
docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition \
54+
exec ospd-openvas cat /var/log/gvm/openvas.log
55+
```
56+
57+
Afterwards using the collected error messages in the [search of our Community Forum](https://forum.greenbone.net/search)
58+
may bring up possible results to resolve the issue already.
59+
60+
If no fitting results can be found feel free to create a new topic the
61+
[Community Containers category in our Community Forum](https://forum.greenbone.net/c/community-containers/40).
62+
563
### VTs are up-to-date but not visible on the web interface
664

765
It may be possible, especially for the initial synchronization, that the scanner

src/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Calendar Versioning](https://calver.org).
1212
* Add a disclaimer that Greenbone isn't involved in packaging for Kali Linux
1313
* Move `Facing an issue with the Greenbone Community Edition` section from
1414
source build troubleshooting to generic troubleshooting page
15+
* Add section about getting the log messages for the Community Containers
1516
* Update gvm-libs to 22.8.0
1617
* Update gvmd to 23.2.0
1718
* Update pg-gvm to 22.6.4

0 commit comments

Comments
 (0)