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

[Monitoring] [Logstash] Add Config View #18597

Merged
merged 44 commits into from
Jun 19, 2018

Conversation

justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Apr 26, 2018

Changes

This feature will add a new visualization of Logstash Pipelines that mimics what the user will see when they look at the corresponding configuration file. Its purpose is to address a problem users encounter with the Pipeline Viewer when visualizing relatively large or complex pipelines.

The overall goal is to resolve #18423.

Review & Testing

Configure Logstash

If you need to run this PR against a stack with Logstash running please let me know and I can grant you access to a demo box we have set up for that express purpose.

I've moved the old instructions to the bottom of this section.

From a functional standpoint these changes do what we want for the initial version of this feature. At the moment we are looking for designer input.

You can see this view by selecting a pipeline from the Pipelines view in Logstash monitoring. Try defining multiple pipelines to see how the component will render each one. I've included an example configuration that I've used for development purposes. It doesn't do anything practical but it does model all of the if/else shapes.

Old configuration instructions:

  • Ensure you have Java 8 installed and set as the Java in your shell. If you don't, check out SDKMAN, it makes managing that a snap.
  • java -version should output java version "1.8.0_161"
  • Download Logstash 6.2.4
  • Unzip/untar LS (tar xofp logstash-6.2.4.tar.gz)
  • From Logstash root directory, install x-pack with ./bin/logstash-plugin install x-pack
  • Overwrite the existing logstash.yml with this one: logstash.yml.zip
    NOTE: if you're using Security on your local stack, you'll have to open that file and un-comment the username/password keys and plug in appropriate values.
  • Set up a test pipeline by running ./bin/logstash -e 'input { stdin { } } output { stdout { } }' from the LS top directory. You'll see Logstash pop up in the Monitoring Overview page in your Kibana, and you should be able to drill into your pipeline to see the viewer.
  • From here you can use example.conf.zip with ./bin/logstash -f {PATH_TO_EXAMPLE_CONF}/example.conf
    Tip: when killing Logstash, send it a second CTRL+C to kill it right away. Part of its shutdown procedure on the first kill command is to empty its queue, but we don't care about those events for our purposes.

Testing

  1. Run various logstash pipelines shapes.
  2. For each, navigate to the Logstash Monitoring/Pipelines page and click your pipeline.
  3. Evaluate the rendered configuration view and ensure that what you see is an accurate representation of your config file.
  4. For if/else branching, make sure that you're able to collapse and expand the elements, and the styling behaves as you'd expect.

Motivation

As mentioned, the primary goal of this view is to address the Pipeline Viewer's lack of usability for pipelines beyond a certain level of complexity, as discussed in #18423. To that end, we are using a more tree-like layout to express the structure of the pipeline configuration, rather than visualizing the actual flow of data through the user's pipeline.

screen shot 2018-06-18 at 9 21 17 am

Followup

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@justinkambic justinkambic requested a review from snide April 26, 2018 15:27
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@justinkambic
Copy link
Contributor Author

Notes from discussion with @snide and @cchaos:

  • Indent size will likely change
  • Explore possibility of filtering for slow/time-consuming plugins (if we did this it'd likely be a subsequent PR)
  • Update top-level nav (this would likely be a separate PR)
  • Mentioned it would be useful if we could somehow annotate pipelines
  • Removal of hard borders: represent the existing plugin data differently (❤️ this type of feedback)
  • Addition of color to enhance view's expressiveness

cc @ycombinator

@justinkambic justinkambic force-pushed the monitoring/add-config-view branch from 86fa15e to 01a35e5 Compare May 4, 2018 14:51
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@justinkambic justinkambic force-pushed the monitoring/add-config-view branch from 01a35e5 to fcdb44d Compare May 9, 2018 19:57
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@justinkambic justinkambic force-pushed the monitoring/add-config-view branch from 10a8b17 to 257a905 Compare May 15, 2018 19:47
@elasticmachine
Copy link
Contributor

💔 Build Failed

@justinkambic justinkambic force-pushed the monitoring/add-config-view branch from 257a905 to a6ae20b Compare May 18, 2018 13:52
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@justinkambic justinkambic force-pushed the monitoring/add-config-view branch from a6ae20b to 522a6b9 Compare May 23, 2018 22:04
@elasticmachine
Copy link
Contributor

💔 Build Failed

@justinkambic justinkambic force-pushed the monitoring/add-config-view branch 3 times, most recently from 4f17978 to 127882f Compare May 24, 2018 19:41
@justinkambic justinkambic force-pushed the monitoring/add-config-view branch from 25f65f1 to a91dc56 Compare June 14, 2018 19:29
@justinkambic
Copy link
Contributor Author

@ycombinator thanks, sounds great!! Just as a heads up, I updated the jest snapshots for some of the DetailDrawer's test. I reviewed all the failing snapshots and they all seemed to be in keeping with the changes Dave made to the component.

I just wanted to get a nod from you since these were updated after you concluded your review. The snapshots are updated in a91dc56, and if you want to reference Dave's changes, they are all in 1f667cc.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@ycombinator
Copy link
Contributor

ycombinator commented Jun 16, 2018

I just wanted to get a nod from you since these were updated after you concluded your review.

Still LGTM.

component="div"
grow={false}
>
<img
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it is better to use an EuiIcon here? Along with the other areas using ad-hoc omg tags? But that's not a blocking item IMHO and is perhaps better in a followup PR anyway.

Copy link
Contributor Author

@justinkambic justinkambic Jun 19, 2018

Choose a reason for hiding this comment

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

I'll create an issue to track it. These changes are indirect to the scope of this PR, it's based on some cleanup that Dave did after he updated the styles.

EDIT: #20021

@justinkambic justinkambic merged commit 6f7dfcf into elastic:master Jun 19, 2018
justinkambic added a commit that referenced this pull request Jun 19, 2018
* Patch ConfigView changes from x-pack-kibana to OSS Kibana.

* Remove old css.

* Update style for queue statement.

* WIP modifying based on designer feedback.

* Add flatten function and list class.

* Rename functions to be more descriptive.

* WIP checkin. Modify components to handle flattened object list.

* Finish moving flatten logic into classes, add tests.

* Simplify flattening, remove non-native dependency. Add more tests.

* Add defaults to simplify function call.

* Refactor two blocks into a function.

* Begin adapting components for list.

* Add collapse functionality.

* Add expand functionality.

* Nested collapsed elements remain collapsed on parent expansion.

* Style section headers.

* Update Plugin statement styles.

* Add DetailDrawer support.

* Update statement formatting.

* Add stats to plugin element rows.

* Resolve conflicts.

* Remove obsolete code.

* Reorganize code.

* Remove warnings.

* Add PropTypes. Add keys to arrays and iterables.

* Update color for borders/buttons.

* Add stat class. Clean up code.

* Convert plugin statement component from class to function.

* Update queue metrics message.

* Update style to make view more responsive.

* Change section heading size.

* Remove gutter from metrics group.

* Change name "stat" to "metric".

* Remove obsolete export line, simplify declaration, based on PR feedback.

* Add new functional component in place of model class.

* Add PropTypes to several components. Rename a function. Add keys to metrics.

* Convert stateless classes to functional components.

* Prefer ES6 syntax over bindings for Component methods.

* Do not render statement section if there are no statements.

* design cleanup for pipeline viewer

* Update CSS to add min-height to page.

* Rename "elements" to "statements". Delete unused LESS variables.

* Revert naming of "statements" to "elements" for StatementList component.

* Update jest snapshots for DetailDrawer.
@justinkambic
Copy link
Contributor Author

justinkambic commented Jun 19, 2018

Backported to:
6.x/6.4.0 b01dc53

@justinkambic justinkambic deleted the monitoring/add-config-view branch June 19, 2018 03:45
maryia-lapata pushed a commit to maryia-lapata/kibana that referenced this pull request Jun 25, 2018
* Patch ConfigView changes from x-pack-kibana to OSS Kibana.

* Remove old css.

* Update style for queue statement.

* WIP modifying based on designer feedback.

* Add flatten function and list class.

* Rename functions to be more descriptive.

* WIP checkin. Modify components to handle flattened object list.

* Finish moving flatten logic into classes, add tests.

* Simplify flattening, remove non-native dependency. Add more tests.

* Add defaults to simplify function call.

* Refactor two blocks into a function.

* Begin adapting components for list.

* Add collapse functionality.

* Add expand functionality.

* Nested collapsed elements remain collapsed on parent expansion.

* Style section headers.

* Update Plugin statement styles.

* Add DetailDrawer support.

* Update statement formatting.

* Add stats to plugin element rows.

* Resolve conflicts.

* Remove obsolete code.

* Reorganize code.

* Remove warnings.

* Add PropTypes. Add keys to arrays and iterables.

* Update color for borders/buttons.

* Add stat class. Clean up code.

* Convert plugin statement component from class to function.

* Update queue metrics message.

* Update style to make view more responsive.

* Change section heading size.

* Remove gutter from metrics group.

* Change name "stat" to "metric".

* Remove obsolete export line, simplify declaration, based on PR feedback.

* Add new functional component in place of model class.

* Add PropTypes to several components. Rename a function. Add keys to metrics.

* Convert stateless classes to functional components.

* Prefer ES6 syntax over bindings for Component methods.

* Do not render statement section if there are no statements.

* design cleanup for pipeline viewer

* Update CSS to add min-height to page.

* Rename "elements" to "statements". Delete unused LESS variables.

* Revert naming of "statements" to "elements" for StatementList component.

* Update jest snapshots for DetailDrawer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logstash pipeline viewer unusable with large pipelines [Pipeline Viewer] Narrow Down New Design Options
5 participants