Skip to content

Conversation

@ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Mar 28, 2019

Depends on elastic/logstash#10561. Do not merge until elastic/logstash#10561 is resolved first.

This PR extends the node metricset in the logstash metricbeat module. It teaches it to understand the xpack.enabled setting in modules.d/logstash.yml. If this setting is set, the metricset indexes logstash_state documents in .monitoring-logstash-* indices.

Resolves partially: #7035

Testing this PR

  1. Start up a Logstash node (built with Refactoring of LIR serializer and exposing pipeline metrics logstash#10561) running one or more pipelines.

  2. Build Metricbeat with this PR:

    cd metricbeat
    mage build
    
  3. Enable the logstash Metricbeat module:

    metricbeat modules enable logstash
    
  4. Configure the logstash Metricbeat module for X-Pack Monitoring. To do this, edit modules.d/logstash.yml and add the following line to it:

    xpack.enabled: true
    
  5. Start Metricbeat:

    metricbeat -e
    
  6. Query the .monitoring-logstash-7-mb-* indices to make sure there are as many documents with type: logstash_state as there are running Logstash pipelines.

    GET .monitoring-logstash-7-mb-*/_search?q=type:logstash_state
    
  7. Repeat the query in 6. above multiple times over the course of a minute or so. Make sure the number of documents stays constant over time. New documents of type:logstash_state should only be created if either the shape of one of the Logstash pipelines changes or the pipeline is restarted.

@ycombinator ycombinator changed the title WIP: metricset for logstash_state Extend logstash.node metricset for logstash_state stack monitoring data Mar 28, 2019
@ycombinator ycombinator added review needs_backport PR is waiting to be backported to other branches. Feature:Stack Monitoring v7.2.0 v8.0.0 labels Mar 28, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/stack-monitoring

@ycombinator ycombinator marked this pull request as ready for review March 28, 2019 10:57
@ycombinator ycombinator requested a review from a team as a code owner March 28, 2019 10:57
@ycombinator
Copy link
Contributor Author

jenkins, test this

Copy link
Contributor

@chrisronline chrisronline left a comment

Choose a reason for hiding this comment

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

LGTM! I tested the functionality through the directions below and didn't see any new documents created until I restarted the pipeline

@cachedout
Copy link
Contributor

I've both reviewed the code and tested this PR and it's a 👍 from me. Nice work, @ycombinator !

@ycombinator
Copy link
Contributor Author

Will wait for elastic/logstash#10561 to be resolved and CI to go green on this PR before merging.

@ycombinator ycombinator merged commit bd2660d into elastic:master May 1, 2019
@ycombinator ycombinator deleted the mb-ls-state branch May 1, 2019 11:05
@ycombinator ycombinator restored the mb-ls-state branch May 1, 2019 12:10
@ycombinator ycombinator deleted the mb-ls-state branch May 1, 2019 12:11
@ycombinator ycombinator removed the needs_backport PR is waiting to be backported to other branches. label Jan 15, 2020
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.

4 participants