Skip to content

Commit

Permalink
doc: Documentation for tetra's log level subcommand
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Schmid <[email protected]>
  • Loading branch information
PhilipSchmid committed Aug 9, 2024
1 parent 3e74d69 commit c54d30f
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions docs/content/en/docs/troubleshooting/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,34 @@ It is possible to change the log level of Tetragon's DaemonSet Pods by setting

### Change log level dynamically

It is possible to change the log level dynamically by sending the corresponding
signal to tetragon process.
It is possible to change the log level dynamically by using the `tetra loglevel`
sub-command. `tetra` needs access to Tetragon's gRPC server endpoint which can
be configured via `--server-address`.
* Change log level to debug level by sending the `SIGRTMIN+20` signal to tetragon pid:
{{< warning >}}
Keep in mind that Tetragon's gRPC server is (by default) only exposed on
`localhost`. Also, it's important to understand that this only changes the log
level of the single Tetragon instance targeted with `--server-address` and not
all Tetragon instances when it's, for example, running as DaemonSet in a
Kubernetes environment.
{{< /warning >}}

* Get the current log level:

```shell
sudo kill -s SIGRTMIN+20 $(pidof tetragon)
tetra loglevel get
```

* Change log level to trace level by sending the `SIGRTMIN+21` signal to tetragon pid:
* Dynamically change the log level. Allowed values are
`[trace|debug|info|warning|error|fatal|panic]`:

```shell
sudo kill -s SIGRTMIN+21 $(pidof tetragon)
tetra loglevel set debug
```

* To Restore the original log level send the `SIGRTMIN+22` signal to tetragon pid:
* Restore the initial log level with which Tetragon was started with (default
is `info`):

```shell
sudo kill -s SIGRTMIN+22 $(pidof tetragon)
tetra loglevel reset
```

0 comments on commit c54d30f

Please sign in to comment.