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

Additional Logstash Metrics #87

Closed
5 tasks done
excalq opened this issue Apr 15, 2023 · 2 comments · Fixed by #101
Closed
5 tasks done

Additional Logstash Metrics #87

excalq opened this issue Apr 15, 2023 · 2 comments · Fixed by #101
Assignees
Labels
enhancement New feature or request

Comments

@excalq
Copy link
Contributor

excalq commented Apr 15, 2023

I'd like to propose the addition of some additional metrics, for use with a Grafana dashboard. (Derived from an existing one on grafana.com's dashboard registry.)

I'll be happy to contribute a PR with the following metrics added:

Standard via "stock Logstash" /_node/stats API response.

  • logstash_stats_process_cpu_load_average_1m
  • logstash_stats_process_cpu_load_average_5m
  • logstash_stats_process_cpu_load_average_15m
  • logstash_stats_process_peak_open_file_descriptors
  • logstash_stats_jvm_gc_collectors_collection_count{pool="*"}
  • logstash_stats_pipeline_plugins_inputs_events_queue_push_duration
  • logstash_stats_pipeline_plugins_inputs_events_out
  • logstash_stats_pipeline_plugins_filters_events_in
  • logstash_stats_pipeline_plugins_filters_events_out
  • logstash_stats_pipeline_plugins_filters_matches
  • logstash_stats_pipeline_plugins_filters_failures
  • logstash_stats_pipeline_plugins_filters_events_duration
  • logstash_stats_pipeline_plugins_outputs_events_in
  • logstash_stats_pipeline_plugins_outputs_events_out
  • logstash_stats_pipeline_plugins_outputs_events_duration
  • logstash_stats_pipeline_reloads_last_success_timestamp
  • logstash_stats_pipeline_reloads_last_failure_timestamp

From the Elasticsearch output plugin (via /_node/stats API response)

  • logstash_stats_pipeline_plugins_outputs_bulk_requests_with_errors
  • logstash_stats_pipeline_plugins_outputs_bulk_requests_successes

Would these (or a subset) be welcome additions to the set that's currently exported?

UPDATE: Checking these off as they are implemented in other PRs.

@kuskoman
Copy link
Owner

hello @excalq sorry for long time to respond, but i was so tired i wanted to hold looking on the issue
about

for elasticsearch output plugin i think you can implement that, however for version 2.x i would like to implement a way to scrape custom plugin metrics, just not sure about that. but for 1.x it should be really useful and apperciated!

I haven't checked each of the metrics that you provided, but they all seem reasonable to add.

If it is not a problem, please split them into 3 separate PRs (this will make PR review process easier):

  • logstash_stats_pipeline_plugins_outputs_bulk_requests_successes and logstash_stats_pipeline_plugins_outputs_bulk_requests_with_errors
  • rest of the logstash_stats_pipeline_plugins_*
  • other metrics that you mentioned

Thank you for contributions to this project!
Please tell me if you need any help with them. Also, if you want to have a faster way of communication with me and/or want to ask questions that aren't directly related to this repo, you can find my email in my github profile. I am working in GMT+2 timezone, so I am not always responsive.
Again thanks for all the contributions!

@kuskoman kuskoman added the enhancement New feature or request label Apr 15, 2023
@excalq
Copy link
Contributor Author

excalq commented Apr 19, 2023

Thanks! Agree on the pre-calculated stats, if they're aggregating another metric... However, the load average really shouldn't be considered a "CPU" load as much as a "system load", as it's the metric of processes using or waiting on the CPU. https://scoutapm.com/blog/understanding-load-averages is a good article on it as well. Situations like high I/O waits will manifest as low CPU utilization but very high system load averages - a common failure mode for data pipeline systems. (Though likely more common in Elasticsearch than Logstash).

I can make commits into a tranche of small PRs, which helps me get them out while doing all the other things! And for v2.x custom metrics, especially for plugins is a great idea. For these, I'm only planning to gather common metrics to all pipeline inputs/filters/outputs, with the exception of the Elasticsearch/OpenSearch output plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants