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

Extend logstash.node_stats metricset for logstash_stats stack monitoring data #11511

Merged
merged 12 commits into from
Jun 26, 2019

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Mar 28, 2019

This PR extends the node_stats 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_stats documents in .monitoring-logstash-* indices.

Resolves partially: #7035

Testing this PR

  1. Start up a Logstash node 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
    

    Note: metricbeat modules enable logstash-xpack will not work as it has not been implemented yet.

  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 documents with type: logstash_stats.

    GET .monitoring-logstash-7-mb-*/_search?q=type:logstash_stats
    
  7. Repeat the query in 6. above multiple times over the course of a minute or so. Make sure the number of documents grows over time. New documents of type:logstash_stats should be created every 10 seconds (corresponding to the default period in modules.d/logstash.yml).

// specific language governing permissions and limitations
// under the License.

package node_stats

Choose a reason for hiding this comment

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

don't use an underscore in package name

@elasticmachine
Copy link
Collaborator

Pinging @elastic/stack-monitoring

@ycombinator ycombinator marked this pull request as ready for review June 25, 2019 13:24
@ycombinator
Copy link
Contributor Author

jenkins, test this

1 similar comment
@ycombinator
Copy link
Contributor Author

jenkins, test this

Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Do you plan to also expand the metrics collected by non-xpack?


type commonStats struct {
Events map[string]interface{} `json:"events"`
JVM map[string]interface{} `json:"jvm"`
Copy link
Member

Choose a reason for hiding this comment

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

@felixbarny @axw Just found some more jvm metrics. I wonder if long term this also ties into our metrics discussion: elastic/ecs#474

Copy link
Contributor

@cachedout cachedout left a comment

Choose a reason for hiding this comment

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

Tested and reviewed. Looks great!

@ycombinator
Copy link
Contributor Author

Do you plan to also expand the metrics collected by non-xpack?

@ruflin Not right away. I want to deliberately keep this set minimal to start out. It's easier to add more later than take away ones we don't need. So I'd rather add metrics as/when users request them.

@ycombinator
Copy link
Contributor Author

Chatted with @ruflin off-PR and he's given his LGTM. So I'm going ahead with the merge.

@ycombinator ycombinator merged commit ca90e10 into elastic:master Jun 26, 2019
@ycombinator ycombinator deleted the mb-ls-stats branch June 26, 2019 19:14
@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.

5 participants