-
Notifications
You must be signed in to change notification settings - Fork 12
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
tt status: print detailed alerts for instances #927
tt status: print detailed alerts for instances #927
Conversation
Please provide examples of how it looks like. |
There are some examples:
|
8166e11
to
23ff5a5
Compare
Perhaps it's better to add an additional flag for this feature (-v/--verbose)? It looks like the output is now becoming less readable, and at the same time much more difficult to parse it in scripts. An another idea: print alerts with the verbose flag, but the instance status by default. Something like this:
I think we need @psergee opinion here. |
I would discuss the output format in context of a human reader, because a machine-readable output is easier to implement separately (with some I think that if something is suspectful on an instance, we should let a user know about it by default. OTOH, we're not obligated to print anything if everything is OK. We can hide the column, for example. Or we can print these warnings on separate lines under the instance name if any. The key idea is the following:
|
Now the output can be easily parsed using regular shell utilities. We can make things complicated here, or we can just keep it simple.
An instance status looks interesting in most cases from my point of view. Even if it is |
I would separate goals of the In my understanding the goal is to show a human if something is wrong with the instances. Without the In contrary, ability to parse the output using simple
Hm. I didn't mean to touch the existing status anyhow (which is However, if we're discussing it, it actually brings not much information. It would be better to give some cumulative 'overview' status that takes into account the In the quoted sentence I meant to hide the extra information we're adding in this pull request if there is nothing important in it. I'm OK with showing the new column always or to hide it if it is empty. I'm OK to place all this information to its own rows (start it with some indent) and don't add any column. IOW, I'm interested in this information to be present and it is not really important for me how exactly it is formatted. I disagree with your proposal to hide the health information under a CLI option, because it is counter-intuitive to have status command, which just says whether a process is running. It is natural expectation that it checks the well known |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the patch.
I agree, but show a brief status of instances. To be able to see at a glance whether there are problems.
Wouldn't it be enough to create a new column just with The rest can be hidden under some
|
tt verbose mode is used to enable debug-level logging that is already present in the tt code, making it easier to troubleshoot issues. This is not about controlling the command output. |
I agree that it would be nice to show some overall health status. Sadly, tarantool has no such field. |
23ff5a5
to
de57025
Compare
ca6f4fe
to
a1b35c4
Compare
df23a3b
to
6d22e37
Compare
fae308c
to
b9e14c9
Compare
a666c0b
to
4aa7237
Compare
Please, rebase to the master branch. |
This patch enhances the `tt status` command to display all collected errors, warnings, and the current status of instances. Closes tarantool#836 @TarantoolBot document Title: Enhanced `tt status` with detailed information. The tt status command now displays statuses reported by `config:info()`, `box.info`, and `box.info.replication*.upstream`. Additionally, you can now view detailed reports of errors and warnings using the `tt status --details` option. Example: You have an invalid config: ```yaml ... invalid_option: ... ``` When you try to apply this config, you can check the status of the Tarantool instance using `tt status`. You'll see that there is an error in the instance: ``` INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM app2:storage-001-b RUNNING 168040 RO check_errors running follow ``` To view detailed alerts, you can use the `--details` option with `tt status`: ``` Instance app2:storage-001-b: [config][error]: [cluster_config] Unexpected field "invalid_option" INSTANCE STATUS PID MODE CONFIG BOX UPSTREAM app2:storage-001-b RUNNING 168040 RO check_errors running follow ```
Add test to verify config, box, and upstream statuses and alerts returned by the new `tt status [--details]` command.
4aa7237
to
19224a7
Compare
Rebased. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the patch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This patch improves the
tt status
command by displaying all collected errors, warnings, and the current instance status. Instances with warnings or errors will now be highlighted in yellow.Closes #836