# No need to set \`xpack.monitoring.collection.enabled\` to true when using metricbeat-based stack monitoring?

**URL:** <https://discuss.elastic.co/t/no-need-to-set-xpack-monitoring-collection-enabled-to-true-when-using-metricbeat-based-stack-monitoring/258237>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring\
**Created:** [December 10, 2020, 9:13am UTC](https://discuss.elastic.co/t/no-need-to-set-xpack-monitoring-collection-enabled-to-true-when-using-metricbeat-based-stack-monitoring/258237 "2020-12-10T09:13:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tetsuyasodo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tetsuyasodo/32/99633_2.png) [@tetsuyasodo](https://discuss.elastic.co/u/tetsuyasodo)\
**Post date:** [December 10, 2020, 9:13am UTC](https://discuss.elastic.co/t/no-need-to-set-xpack-monitoring-collection-enabled-to-true-when-using-metricbeat-based-stack-monitoring/258237/1 "2020-12-10T09:13:11Z")

</div>

> **[Collecting Elasticsearch monitoring data with Metricbeat | Elasticsearch...](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/configuring-metricbeat.html)**

Reading this document, I'm testing stack monitoring using metricbeat not Legacy collection method.

In this stack monitoring document, it says:

> 1.Enable the collection of monitoring data.  
> Set `xpack.monitoring.collection.enabled` to `true` on the production cluster. By default, it is is disabled ( `false` ).

But I don't understand why this parameter needs to be set to true, because metricbeat can access to Elasticsearch(9200 port) API to collect its metric data whether this parameter is true of false. In other words, I don't want collect any metric data in this (production) cluster but want to store them in the monitoring cluster.  
Also with regard to kibana monitoring, I can use metricbeat to collect metrics. So this parameter can be false.  
Anyone knows this is just a document bug, or there is some reason we should change this parameter true?

Thanks.  
Tetsuya

---

<div class="post-metadata">

**Author:** ![chrisronline](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrisronline/32/28230_2.png) [@chrisronline](https://discuss.elastic.co/u/chrisronline)\
**Post date:** [December 11, 2020, 4:37pm UTC](https://discuss.elastic.co/t/no-need-to-set-xpack-monitoring-collection-enabled-to-true-when-using-metricbeat-based-stack-monitoring/258237/2 "2020-12-11T16:37:09Z")

</div>

Hi @tetsuyasodo,

Technically, you are correct. You do not need to enable this setting for Metricbeat monitoring to work properly. In the future, this will be removed from the docs. However, we currently have a need to do this for Metricbeat users, where [cluster alerts](https://www.elastic.co/guide/en/kibana/current/cluster-alerts.html) are currently created and managed by the legacy monitoring architecture, [which is a known issue](https://github.com/elastic/elasticsearch/issues/51762#issuecomment-601254533) too.

We are actively trying to migrate these alerts to [Kibana alerting](https://www.elastic.co/guide/en/kibana/current/kibana-alerts.html) which will make the above issue moot. You can follow along on that effort with [this ticket](https://github.com/elastic/kibana/issues/81020).

For now, follow the steps as written as they are designed to help get around this issue. Once we have finished the migration to Kibana alerting, we will update the docs and remove that step.

---

<div class="post-metadata">

**Author:** ![tetsuyasodo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tetsuyasodo/32/99633_2.png) [@tetsuyasodo](https://discuss.elastic.co/u/tetsuyasodo)\
**Post date:** [December 12, 2020, 1:59am UTC](https://discuss.elastic.co/t/no-need-to-set-xpack-monitoring-collection-enabled-to-true-when-using-metricbeat-based-stack-monitoring/258237/3 "2020-12-12T01:59:41Z")

</div>

Hi @chrisronline ,

Thank you for your comment. I could deeply understand the background and the current status.  
To confirm this index for the cluster alerts, I saw indices in my fresh ES 7.10.1 cluster this morning after "xpack.monitoring.collection.enabled" has been set to true. But I can't find this index (.monitoring-alerts-\*) in the cluster. (My 3 node ES cluster and X-pack enabled for trial)  
Any additional condition required to see this index?

```auto
# curl localhost:9200/_cat/indices
green open .triggered_watches 2WVkKTt1SyaiK5Gpfp-tNg 1 1 6 0 10.1kb 5kb
green open .apm-custom-link 7LPQqoMmSQmZ5kge6ppNFw 1 1 0 0 416b 208b
green open .kibana_task_manager_1 diVbujArRBekdsvifNX8iA 1 1 5 60 157.3kb 50.9kb
green open .monitoring-es-7-2020.12.12 -UFXIP0dRmap03pl25GQZw 1 1 1379 1332 2.9mb 1.2mb
green open .apm-agent-configuration WN0FRVPtTGyNxapXH60znw 1 1 0 0 416b 208b
green open .kibana-event-log-7.10.1-000001 FY6JO9zcTWCe2UWiL8HvmA 1 1 3 0 32.9kb 16.4kb
green open .monitoring-kibana-7-2020.12.12 jlXpOqwoQg-8shUt74vwMA 1 1 476 0 412.5kb 158.2kb
green open .watches gv8sYbTVSsOGt2cOy4heTA 1 1 6 66 214.6kb 154.2kb
green open .kibana_1 3uEt79h5SJicLtNzLXrVew 1 1 29 34 4.2mb 2.1mb

```

---

<div class="post-metadata">

**Author:** ![chrisronline](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrisronline/32/28230_2.png) [@chrisronline](https://discuss.elastic.co/u/chrisronline)\
**Post date:** [December 14, 2020, 2:00pm UTC](https://discuss.elastic.co/t/no-need-to-set-xpack-monitoring-collection-enabled-to-true-when-using-metricbeat-based-stack-monitoring/258237/4 "2020-12-14T14:00:51Z")

</div>

Hi @tetsuyasodo,

The index will only exist when one of the watches enters a "firing" state.

You can use the Watcher UI in Kibana (`Stack Management -> Watcher`) to see if the six watches exist for Stack Monitoring.

---

<div class="post-metadata">

**Author:** ![tetsuyasodo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tetsuyasodo/32/99633_2.png) [@tetsuyasodo](https://discuss.elastic.co/u/tetsuyasodo)\
**Post date:** [December 15, 2020, 2:35am UTC](https://discuss.elastic.co/t/no-need-to-set-xpack-monitoring-collection-enabled-to-true-when-using-metricbeat-based-stack-monitoring/258237/5 "2020-12-15T02:35:26Z")

</div>

I completely understand.  
I've tested Watcher UI and I can see six watchers exist.  
Thank you for your clear explanation.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 12, 2021, 2:35am UTC](https://discuss.elastic.co/t/no-need-to-set-xpack-monitoring-collection-enabled-to-true-when-using-metricbeat-based-stack-monitoring/258237/6 "2021-01-12T02:35:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
