Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api/monitor: Adding log format to monitor command and debug #15536

Merged
merged 4 commits into from May 24, 2022

Conversation

davidadeleon
Copy link
Contributor

@davidadeleon davidadeleon commented May 20, 2022

Adding log_format flag to monitor endpoint as well as debug command. This will allow the option for vault logs being emitted via monitor to come through as JSON format. The default behavior is to emit in the standard log format.

Usage:
vault monitor -log-level=DEBUG -log-format=JSON

curl -H "X-Vault-Request: true" -H "X-Vault-Token: $(vault print token)" http://127.0.0.1:8200/v1/sys/monitor?log_format=json&log_level=trace

vault debug -target=log -log-format=json

@davidadeleon davidadeleon force-pushed the davidadeleon-add-format-flag-to-monitor branch from c3d4b5c to bf23ca8 Compare May 20, 2022 18:58
Copy link
Contributor

@jasonodonnell jasonodonnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@davidadeleon davidadeleon force-pushed the davidadeleon-add-format-flag-to-monitor branch from f7d94d6 to 5b1c8b7 Compare May 20, 2022 20:36
Copy link
Contributor

@ccapurso ccapurso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small comment on one of the doc changes but otherwise looks good!

website/content/api-docs/system/monitor.mdx Outdated Show resolved Hide resolved
Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>
@davidadeleon davidadeleon merged commit 6ee3fcb into main May 24, 2022
@davidadeleon davidadeleon deleted the davidadeleon-add-format-flag-to-monitor branch May 24, 2022 17:10
davidadeleon added a commit that referenced this pull request Jun 3, 2022
* Correct handling of "unspecified" log level

* Setting log-format default on monitor path

* Create changelog file

* Update website/content/api-docs/system/monitor.mdx

Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>

Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>
Gabrielopesantos pushed a commit to Gabrielopesantos/vault that referenced this pull request Jun 6, 2022
…p#15536)

* Correct handling of "unspecified" log level

* Setting log-format default on monitor path

* Create changelog file

* Update website/content/api-docs/system/monitor.mdx

Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>

Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>
davidadeleon added a commit that referenced this pull request Jun 6, 2022
…15791)

* Correct handling of "unspecified" log level

* Setting log-format default on monitor path

* Create changelog file

* Update website/content/api-docs/system/monitor.mdx

Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>

Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>

Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>
Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants