-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure monitor command docs and add monitor partial (#28753)
* Restructure and add partial * Update website/content/docs/commands/monitor.mdx Co-authored-by: Sarah Chavis <[email protected]> * Update website/content/docs/commands/monitor.mdx Co-authored-by: Sarah Chavis <[email protected]> * Update website/content/partials/cli/monitor/flags/log-format.mdx Co-authored-by: Sarah Chavis <[email protected]> * Update website/content/partials/cli/monitor/flags/log-format.mdx Co-authored-by: Sarah Chavis <[email protected]> * Update website/content/partials/cli/monitor/flags/log-format.mdx Co-authored-by: Sarah Chavis <[email protected]> * Update website/content/partials/cli/monitor/flags/log-level.mdx Co-authored-by: Sarah Chavis <[email protected]> * Update website/content/partials/cli/monitor/flags/log-level.mdx Co-authored-by: Sarah Chavis <[email protected]> * Update website/content/partials/cli/monitor/flags/log-level.mdx Co-authored-by: Sarah Chavis <[email protected]> * Address feedback --------- Co-authored-by: Sarah Chavis <[email protected]> Co-authored-by: Yoko Hyakuna <[email protected]>
- Loading branch information
1 parent
48cf1a1
commit ad55f8a
Showing
3 changed files
with
74 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,77 @@ | ||
--- | ||
layout: docs | ||
page_title: monitor - Command | ||
page_title: 'monitor - Vault CLI' | ||
description: |- | ||
The "monitor" command displays the server logs of a Vault server in real | ||
time. | ||
Display the server logs of a Vault server in real time. | ||
--- | ||
|
||
# monitor | ||
# `monitor` | ||
|
||
The `monitor` command shows a real time display of the server logs of a Vault | ||
Stream Vault server logs in real-time to `stdout`. | ||
|
||
<CodeBlockConfig hideClipboard> | ||
|
||
```shell-session | ||
$ vault monitor [flags] | ||
$ vault monitor [-help | -h] | ||
``` | ||
|
||
</CodeBlockConfig> | ||
|
||
## Description | ||
|
||
`vault monitor` command shows a real time display of the server logs of a Vault | ||
server. This command accepts a log level as an argument, which can be different | ||
from the log level that the Vault server was started with. | ||
|
||
The `monitor` command honors the `VAULT_ADDR` environment variable. The address | ||
`vault monitor` honors the `VAULT_ADDR` environment variable. The address | ||
specified determines the target server that will be monitored. | ||
|
||
Note that this command is designed to run indefinitely. It is similar to | ||
`tail -f` in the Unix world. This command will not exit on its own unless | ||
it encounters an unexpected error. As a user, you must terminate this | ||
process yourself to shut it down. | ||
### Limitations and warnings | ||
|
||
If Vault is emitting log messages faster than a receiver can process them, the | ||
some log lines will be dropped. | ||
- Note that this command is designed to run indefinitely. It is similar to | ||
`tail -f` in the Unix world. This command will not exit on its own unless | ||
it encounters an unexpected error. As a user, you must terminate this | ||
process yourself to shut it down. | ||
|
||
## Examples | ||
- If Vault is emitting log messages faster than a receiver can process them, the | ||
some log lines will be dropped. | ||
|
||
Monitor server logs at the `debug` log level: | ||
<Tip title="Related API endpoints"> | ||
|
||
```shell-session | ||
$ vault monitor -log-level=debug | ||
``` | ||
MonitorLogs - [`GET: /sys/monitor`](/vault/api-docs/system/monitor) | ||
|
||
</Tip> | ||
|
||
## Usage | ||
## Command arguments | ||
|
||
The following flags are available in addition to the [standard set of | ||
flags](/vault/docs/commands) included on all commands. | ||
- None | ||
|
||
### Output options | ||
## Command options | ||
|
||
- `-log-level` `(string: "info")` - Monitor the Vault server at this log level. | ||
Valid log levels are (in order of detail) "trace", "debug", "info", | ||
"warn", "error". If this option is not specified, "info" is used. | ||
- None | ||
|
||
- `-log-format` `(string: "standard")` - Format to emit logs. | ||
Valid formats are "standard", and "json". | ||
If this option is not specified, "standard" is used. | ||
## Command flags | ||
|
||
<br /> | ||
|
||
@include 'cli/monitor/flags/log-level.mdx' | ||
|
||
<br /> | ||
<hr /> | ||
<br /> | ||
|
||
@include 'cli/monitor/flags/log-format.mdx' | ||
|
||
## Standard flags | ||
|
||
@include 'cli/standard-settings/all-standard-flags.mdx' | ||
|
||
## Examples | ||
|
||
Monitor server logs at the `debug` log level: | ||
|
||
```shell-session | ||
$ vault monitor -log-level=debug | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<a id="monitor-flag-log-format" /> | ||
|
||
**`-log-format (string : "standard")`** | ||
|
||
Format to emit logs. | ||
Valid formats are "standard", and "json". | ||
|
||
**Example**: `-log-format "standard"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<a id="monitor-flag-log-level" /> | ||
|
||
**`-log-level (enum : info)`** | ||
|
||
Monitor the Vault server at this log level. | ||
Valid log levels are (in order of detail) "trace", "debug", "info", | ||
"warn", "error". | ||
|
||
**Example**: `-log-level debug` |