# Metricbeats only ships node\_stats, but not cluster\_stats to x-pack monitoring

**URL:** https://discuss.elastic.co/t/metricbeats-only-ships-node-stats-but-not-cluster-stats-to-x-pack-monitoring/238948
**Category:** Beats
**Created:** [June 27, 2020, 1:05pm UTC](https://discuss.elastic.co/t/metricbeats-only-ships-node-stats-but-not-cluster-stats-to-x-pack-monitoring/238948 "2020-06-27T13:05:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![souravsahoo](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@souravsahoo](https://discuss.elastic.co/u/souravsahoo)
#### Post date: [June 27, 2020, 1:05pm UTC](https://discuss.elastic.co/t/metricbeats-only-ships-node-stats-but-not-cluster-stats-to-x-pack-monitoring/238948/1 "2020-06-27T13:05:16Z")

</div>

Hi, I have a 3 master, multiple data node architecture. Metricbeat's elasticsearch-xpack module is configured to ship elasticsearch metrics to a separate monitoring cluster. However, I see only node\_stats are sent and no cluster\_stats. because fo which, the Kibana monitoring page doesn't show any data.

Below is the elasticsearch-xpack.yml

```
- module: elasticsearch
  metricsets:
    - ccr
    - cluster_stats
    - enrich
    - index
    - index_recovery
    - index_summary
    - ml_job
    - node_stats
    - shard
  period: 10s
  hosts: ["https://{{ELASTICSEARCH_URL}}:9200"]
  username: "elastic"
  password: "{{MONITORING_USER_PASSWORD}}"
  xpack.enabled: true

```

metricbeat.yml

```
#========================== Modules configuration ============================
  metricbeat.config.modules:
    path: ${path.config}/modules.d/*.yml
    reload.enabled: false
  #==================== Elasticsearch template setting ==========================
  setup.template.settings:
    index.number_of_shards: 1
    index.codec: best_compression
  #============================== Kibana =====================================
  setup.kibana:
    host: "{{MONITORING_KIBANA_URL}}:5601"
    protocol: "https"
    username: {{USERNAME}}
    password: {{PASSWORD}}
  #-------------------------- Elasticsearch output ------------------------------
  output.elasticsearch:
    hosts: ["{{MONITORING_ELASTICSEARCH_URL}}:9200"]
    protocol: "https"
    username: {{USERNAME}}
    password: {{PASSWORD}}
  
  #================================ Processors =====================================  
  processors:
    - add_host_metadata: ~
    - add_cloud_metadata: ~
    - add_docker_metadata: ~
    - add_kubernetes_metadata: ~
  #============================== X-Pack Monitoring ===============================
  monitoring.enabled: true
  monitoring.elasticsearch:
    hosts: ["{{MONITORING_ELASTICSEARCH_URL}}:9200"]
    protocol: "https"
    username: "elastic"
    password: {{PASSWORD}}

```

I have tested the config and it all looks fine. I have tested output

> ./metricbeat test output

elasticsearch: [https://xxxxx:9200](https://xxxxx:9200)...  
parse url... OK  
connection...  
parse host... OK  
dns lookup... OK  
addresses: x.x.x.x, x.x.x.x  
dial up... OK  
TLS...  
security: server's certificate chain verification is enabled  
handshake... OK  
TLS version: TLSv1.3  
dial up... OK  
talk to server... OK  
version: 7.7.0

> ./metricbeat test modules

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/c/2c79386b39e7d3f2ee2c099e4d8de4eb6ffa7856.png)

The above image says, cluster\_stats events are not captured. However, node\_stats events are.

From the below debug logs, it looks like metricbeat is detecting the node as a non-master node. However, the node is a master node.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/3/43ae51131539f8b6c4c3d261ad02a5cb4394a600.png)

Not sure, why.

On further debugging, found out that the node name returned from the **\_cluster/state/master\_node** and **\_nodes/\_local/name** are not same. And this is very strange.

Could anyone please help on this?

---

<div class="post-metadata">

### Author: ![souravsahoo](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@souravsahoo](https://discuss.elastic.co/u/souravsahoo)
#### Post date: [June 28, 2020, 6:47pm UTC](https://discuss.elastic.co/t/metricbeats-only-ships-node-stats-but-not-cluster-stats-to-x-pack-monitoring/238948/2 "2020-06-28T18:47:10Z")

</div>

Any help on this?

---

<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: [July 26, 2020, 8:47pm UTC](https://discuss.elastic.co/t/metricbeats-only-ships-node-stats-but-not-cluster-stats-to-x-pack-monitoring/238948/3 "2020-07-26T20:47:17Z")

</div>

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