[role="xpack"]
[[configuring-logstash]]
== Monitoring {ls}

Use the {stack} {monitor-features} to gain insight into the health of
{ls} instances running in your environment.

For an introduction to monitoring your Elastic stack, see
{ref}/monitor-elasticsearch-cluster.html[Monitoring a cluster] in the
{ref}[Elasticsearch Reference].

[float]
[[configuring-logstash-xpack]]
=== Configuring monitoring for {ls}

Make sure monitoring is enabled on your {es} cluster. Then configure *one* of
these methods to collect {ls} metrics:

* <<monitoring-with-metricbeat, {metricbeat} collection>>. Metricbeat collects
monitoring data from your {ls} instance and sends it directly to your monitoring
cluster. The benefit of Metricbeat collection is that the monitoring
agent remains active even if the {ls} instance does not.

* <<monitoring-internal-collection-legacy,Legacy collection (deprecated)>>. 
Legacy collectors send monitoring data to your production cluster.

include::monitoring-mb.asciidoc[]
include::monitoring-internal-legacy.asciidoc[]
include::monitoring-ui.asciidoc[]
include::pipeline-viewer.asciidoc[]
include::troubleshooting.asciidoc[]
