open-consul/website/content/commands/monitor.mdx
Zachary Shilton 5b53b5aef5
website: implement mktg 032 (#9953)
* website: migrate to new nav-data format

* website: clean up unused intro content

* website: remove deprecated sidebar_title from frontmatter

* website: add react-content to fix global style import issue
2021-04-07 15:50:38 -04:00

38 lines
1.2 KiB
Plaintext

---
layout: commands
page_title: 'Commands: Monitor'
description: >-
The `monitor` command is used to connect and follow the logs of a running
Consul agent. Monitor will show the recent logs and then continue to follow
the logs, not exiting until interrupted or until the remote agent quits.
---
# Consul Monitor
Command: `consul monitor`
The `monitor` command is used to connect and follow the logs of a running
Consul agent. Monitor will show the recent logs and then continue to follow
the logs, not exiting until interrupted or until the remote agent quits.
The power of the monitor command is that it allows you to log the agent
at a relatively high log level (such as "warn"), but still access debug
logs and watch the debug logs if necessary.
## Usage
Usage: `consul monitor [options]`
#### API Options
@include 'http_api_options_client.mdx'
#### Command Options
- `-log-level` - The log level of the messages to show. By default this
is "info". This log level can be more verbose than what the agent is
configured to run at. Available log levels are "trace", "debug", "info",
"warn", and "err".
- `-log-json` - Toggles whether the messages are streamed in JSON format.
By default this is false.