elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
68 stars 3.5k forks source link

[Stack Monitoring] Remove internal collectors #11169

Open ycombinator opened 5 years ago

ycombinator commented 5 years ago

The work described in this issue is a breaking change. As such, it is intended to be released only in a major release (i.e. no backports).

We now have the ability to monitor Elasticsearch, Kibana, Logstash, Beats, and APM Server with Metricbeat. The previous method of monitoring stack products, using collection code internal to each product that shipped monitoring data to a custom Monitoring Bulk API endpoint, is now deprecated. And in the next major release (likely 8.0.0), all code related to this internal collection approach should be removed.

This issue tracks the removal of one specific item related to the internal collection approach: the code within Logstash that periodically collects monitoring metrics to construct logstash_stats and logstash_state documents, and ships them to the custom Monitoring Bulk API in Elasticsearch (POST _monitoring/bulk). Note that settings related to this code (xpack.monitoring.*) should also be removed, including from documentation.

By removing this internal collection code Logstash will no longer be able to monitor itself (for the purposes of the Stack Monitoring application in Kibana). Instead, users will have to run Metricbeat along side Logstash and enable the logstash-xpack module. This module knows how to poll various Logstash APIs to periodically collect monitoring metrics and ship them to the monitoring Elasticsearch cluster.

While removing the internal collection code, be careful to make sure that the various Logstash Monitoring APIs continue to function as-is, as they are required for Metricbeat collection.

andsel commented 4 years ago

@ycombinator what do you think of using the APM's instrumenting agent to monitor metrics of stack's components?

ycombinator commented 4 years ago

@andsel For now, we plan to use Metricbeat but definitely would be interesting to consider the APM agent in the future as well. I suggest chatting with @cachedout about it, as he's the area lead for the @elastic/stack-monitoring team.

cachedout commented 4 years ago

Hi @andsel. I've thought a bit about this but I'd definitely be interested to hear more about specifically how you see APM instrumentation fitting into Logstash monitoring.

andsel commented 4 years ago

Mine are only plain thoughts. APM has a client lib to instrument Java code (with the agent) and LogStash at the end is a Java application. So we could benefit from standard monitoring metrics, to investigate the behaviour of the heap, including pauses from GC, but we can use it to replace the internal collectors to count the events per second processed by every plugin. Going deeper, we can know how much time an event spend in every plugin, and probably with percentiles knowing which is the more time consuming events, discover the latency that an event experience during the provessing.

cachedout commented 4 years ago

@andsel Thanks for the explanation. I agree that this is worthy of more investigation but I think the first step here would be to identify the potential enhancements that an APM-based approach would have over the current pipeline viewer.

cachedout commented 4 years ago

@jsvd I'd just like to bring this issue to your attention and see if we can get it assigned to a Logstash developer soon. Let me know what you think. Thanks!