# Metricbeat elasticsearch module can't monitor \[cluster\_stats,index,shard\] metricsets when xpack.monitoring.exporters is set

**URL:** https://discuss.elastic.co/t/metricbeat-elasticsearch-module-cant-monitor-cluster-stats-index-shard-metricsets-when-xpack-monitoring-exporters-is-set/222597
**Category:** Beats
**Tags:** metricbeat
**Created:** [March 8, 2020, 12:11pm UTC](https://discuss.elastic.co/t/metricbeat-elasticsearch-module-cant-monitor-cluster-stats-index-shard-metricsets-when-xpack-monitoring-exporters-is-set/222597 "2020-03-08T12:11:35Z")
**Posts on this page:** 4
**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: [March 8, 2020, 12:11pm UTC](https://discuss.elastic.co/t/metricbeat-elasticsearch-module-cant-monitor-cluster-stats-index-shard-metricsets-when-xpack-monitoring-exporters-is-set/222597/1 "2020-03-08T12:11:35Z")

</div>

Hi,  
I'm using an ES6.8 3 nodes cluster(cluster A) and an ES6.8 1 node cluster(cluster B).  
The cluster B is used for monitoring the cluster A.  
I'm exporting the .monitoring index from cluster A to cluster B.  
The configuration for exporting is the following:

```
xpack.monitoring.collection.enabled: true
xpack.monitoring.exporters:
  monitoring_cluster:
    type: http
    host: ["http://mon1:9200"]

```

I've also installed metricbeat on each node of cluster A and enable the elasticsearch module.  
In this module I'd like to fetch the detail metrics by using cluster\_stats, index and shard metricsets.

The configuration of metricbeat is the following:

```
- module: elasticsearch
  metricsets:
    - node
    - node_stats
    - cluster_stats
    - index
    - shard
  period: 10s
  hosts: ["http://localhost:9200"]

```

However, the metricbeat doesn't fetch these metricsets from cluster A. Only node and node\_stats metricsets can be fetched.  
I know there is no ".monitoring" indices in cluster A because they are transferred to cluster B. I'm afraid this is cause of this symptom.  
Do we need to have their own ".monitoring" indices for the cluster in order to fetch the detail metrics for elaticsearch module?

Thanks for your help  
Tetsuya

---

<div class="post-metadata">

### Author: ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)
#### Post date: [March 9, 2020, 8:25am UTC](https://discuss.elastic.co/t/metricbeat-elasticsearch-module-cant-monitor-cluster-stats-index-shard-metricsets-when-xpack-monitoring-exporters-is-set/222597/2 "2020-03-09T08:25:31Z")

</div>

Hi @tetsuyasodo,

could you please share some logs with us (temporarily enable logging)? Maybe it's a typo somewhere.

---

<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: [March 9, 2020, 4:36pm UTC](https://discuss.elastic.co/t/metricbeat-elasticsearch-module-cant-monitor-cluster-stats-index-shard-metricsets-when-xpack-monitoring-exporters-is-set/222597/3 "2020-03-09T16:36:33Z")

</div>

Hi @mtojek ,  
Thanks for your comment.  
I've found I ran only one metricbeat of three nodes and it is not the master node.  
Starting the metricbeat on the master node solved the problem and I can see all the metricsets including cluster\_stats, index and shards now.  
Your comment let me clarify they should be fetched with this architecture.  
Much appreciated!

Tetsuya

---

<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: [April 6, 2020, 4:36pm UTC](https://discuss.elastic.co/t/metricbeat-elasticsearch-module-cant-monitor-cluster-stats-index-shard-metricsets-when-xpack-monitoring-exporters-is-set/222597/4 "2020-04-06T16:36:34Z")

</div>

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