status: add support for multiple output formats#1249
Merged
bigbes merged 1 commit intotarantool:masterfrom Mar 29, 2026
Merged
Conversation
patapenka-alexey
approved these changes
Mar 3, 2026
Contributor
patapenka-alexey
left a comment
There was a problem hiding this comment.
Thank you for the patch! LGTM.
104136a to
24ef0a7
Compare
bigbes
requested changes
Mar 12, 2026
24ef0a7 to
3ea9405
Compare
bigbes
approved these changes
Mar 20, 2026
bigbes
requested changes
Mar 20, 2026
Collaborator
bigbes
left a comment
There was a problem hiding this comment.
Sorry for long response, let's not make any breaking changes in patch or minor versions. Mark this option as deprecated pls in "--help" and when it's used. "--format" option should take precedence before "--pretty". TYVM for your patch!
3ea9405 to
f2457ae
Compare
The status command now supports JSON and YAML output formats in addition to the existing table format. This change introduces a printer interface that separates output formatting logic from core status functionality. New --format CLI option allows users to get machine-readable output for automation purposes. Maps --pretty to --format pretty-table for backward compatibility. Closes tarantool#1245 @TarantoolBot document Title: `tt status` supports JSON and YAML output formats The `tt status` command now supports multiple output formats: - Table format (default, human-readable) - JSON format (machine-readable, for automation) - YAML format (machine-readable, for automation) Usage: - `tt status` - default table output - `tt status --format=json` - JSON output - `tt status --format=yaml` - YAML output `--pretty` option is deprecated in favor of `--format=pretty-table`. The JSON and YAML formats include all status information: - Instance name - Status (RUNNING, STOPPED, etc.) - PID (if running) - Mode (RW/RO) - Config status - Box status - Upstream status - Alerts (with severity levels) Example JSON output: ```json { "app:master": { "status": "RUNNING", "pid": 12345, "mode": "RW", "config": "ready", "box": "running", "upstream": "--", "alerts": [] } } ```
f2457ae to
0eb8e71
Compare
bigbes
approved these changes
Mar 29, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The status command now supports JSON and YAML output formats in addition to the existing table format. This change introduces a printer interface that separates output formatting logic from core status functionality.
New --format CLI option allows users to get machine-readable output for automation purposes.
Closes #1245
@TarantoolBot document
Title:
tt statussupports JSON and YAML output formatsThe
tt statuscommand now supports multiple output formats:Usage:
tt status- default table outputtt status --format=json- JSON outputtt status --format=yaml- YAML outputThe JSON and YAML formats include all status information:
Example JSON output:
{ "app:master": { "status": "RUNNING", "pid": 12345, "mode": "RW", "config": "ready", "box": "running", "upstream": "--", "alerts": [] } }