Skip to content
This repository was archived by the owner on Nov 18, 2020. It is now read-only.

Conversation

michaelklishin
Copy link
Contributor

@michaelklishin michaelklishin commented May 10, 2019

This introduces a new command, rabbitmq-diagnostics observer, which provides a way to start observer CLI on the target node.

Depends on rabbitmq/rabbitmq-server#2006.

Per discussion with @gerhard.

Currently patched to depend on latest Recon release.
Kudos to @zhongwencool for releasing it so quickly.
@gerhard
Copy link
Contributor

gerhard commented May 10, 2019

This is so cool! Looking forward to QA 💯

@michaelklishin
Copy link
Contributor Author

What the interface looks like:

observer_cli

It is fully controlled with lettered shortcuts + RET/[Enter] and mimics the GUI Observer Erlang app.

michaelklishin added a commit to rabbitmq/rabbitmq-server that referenced this pull request May 10, 2019
It will only be used by rabbitmq-cli and must be available on broker
nodes. It makes most sense to have it in these two reports only
and not expose it in rabbitmq-components.mk.

Per discussion with @dumbbell.

Part of rabbitmq/rabbitmq-cli#353.
@michaelklishin
Copy link
Contributor Author

Note: one test is disabled as observer_cli:start/2 currently does not communicate errors correctly.

@michaelklishin michaelklishin marked this pull request as ready for review May 10, 2019 21:26
@michaelklishin michaelklishin changed the title WIP Observer CLI integration Observer CLI integration May 10, 2019
@michaelklishin michaelklishin requested a review from gerhard May 10, 2019 21:26
@zhongwencool
Copy link

@michaelklishin 1.4.4 is ready :0

@michaelklishin
Copy link
Contributor Author

@gerhard this is ready for QA 🙏

@gerhard
Copy link
Contributor

gerhard commented May 11, 2019

Nice, will check it out shortly!

@gerhard
Copy link
Contributor

gerhard commented May 11, 2019

observer_cli is failing to install for me:

ls $PWD/.erlang.mk
ls: /Users/gerhard/github.com/rabbitmq/20190501/deps/rabbit/.erlang.mk: No such file or directory

ls $PWD/../observer_cli
ls: /Users/gerhard/github.com/rabbitmq/20190501/deps/rabbit/../observer_cli: No such file or directory

gmake deps
 DEP    observer_cli
tar: Error opening archive: Failed to open '/Users/gerhard/github.com/rabbitmq/20190501/deps/rabbit/.erlang.mk/hex/observer_cli.tar'

ls ../observer_cli
cat ../observer_cli/Makefile
noop:

umbrella is clean, I have the observer_cli branches checked out in both rabbit & rabbitmq_cli. Will continue with this tomorrow.

gerhard added a commit to rabbitmq/rabbitmq-server that referenced this pull request May 13, 2019
It fails to install properly, as described in
#353 (comment)
Copy link
Contributor

@gerhard gerhard left a comment

Choose a reason for hiding this comment

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

observer_cli should be added to rabbitmq-components.mk instead of the Makefile before we merge this. I'm thinking right under dep_recon since these 2 deps are likely to be bumped in lock-step.

I also think that we should add rabbitmqctl observe in the Monitoring, observability and health checks section.

The viewport looks wrong when running scripts/rabbitmq-diagnostic observer (left) vs observer_cli:start() via the gmake run-broker shell (right):

image

@zhongwencool
Copy link

The diff between escript and remsh is because io:rows() can't get row in escript, so use a DEFAULT_ROW(Suppose the screen is only 13 inch).
https://github.com/zhongwencool/observer_cli/blob/master/src/observer_cli_lib.erl#L237-L241

I can't find a better way to solve this problem right now.

@gerhard
Copy link
Contributor

gerhard commented May 13, 2019

The diff between escript and remsh is because io:rows() can't get row in escript, so use a DEFAULT_ROW(Suppose the screen is only 13 inch).

Thanks! If @dumbbell doesn't have a suggestion, happy to leave this as is.

@michaelklishin
Copy link
Contributor Author

I also think that we should add rabbitmqctl observe in the Monitoring, observability and health checks section

It already is for rabbitmq-diagnostics. We no longer add new commands to rabbitmqctl unless there are good reason to do so (e.g. it does not clearly fit into any other tool/scope).

michaelklishin added a commit to rabbitmq/rabbitmq-common that referenced this pull request May 13, 2019
@gerhard gerhard merged commit 3418f35 into master May 13, 2019
@gerhard gerhard deleted the observer-cli branch May 13, 2019 14:47
@michaelklishin
Copy link
Contributor Author

@gerhard thank you. This currently will fail in our pipelines as we need zhongwencool/observer_cli#57 to go in before Mix can build it on Concourse (due to a Mix behavior neither @dumbbell nor I can explain at the moment). So we will have to do another rabbitmq-components.mk update.

@michaelklishin michaelklishin restored the observer-cli branch May 13, 2019 14:58
@michaelklishin michaelklishin deleted the observer-cli branch May 13, 2019 15:17
michaelklishin added a commit to rabbitmq/rabbitmq-common that referenced this pull request May 13, 2019
michaelklishin pushed a commit that referenced this pull request May 13, 2019
Observer CLI integration

(cherry picked from commit 3418f35)

Conflicts:
	mix.exs
gerhard added a commit to rabbitmq/rabbitmq-server-boshrelease that referenced this pull request Jun 3, 2019
It's included in RabbitMQ as of v3.7.15 & v3.8.0-beta.5

re rabbitmq/rabbitmq-cli#353
HoloRin pushed a commit to rabbitmq/rabbitmq-monorepo that referenced this pull request Aug 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants