Metricbeat Elasticsearch Module not working

Issue -
Trying to set up metricbeat to collect ES metric but upon testing the elasticsearch-xpack module, its not able to connect except for "node_stats" metric and generating the error as shown below.

Can someone point in the right direction to help understand what might be causing this issue?

Error -

metricbeat test modules elasticsearch
elasticsearch...
  ccr...
    error... ERROR timeout waiting for an event
  cluster_stats...
    error... ERROR timeout waiting for an event
  enrich...
    error... ERROR timeout waiting for an event
  index...
    error... ERROR timeout waiting for an event
  index_recovery...
    error... ERROR timeout waiting for an event
  index_summary...
    error... ERROR timeout waiting for an event
  ml_job...
    error... ERROR timeout waiting for an event
  node_stats...OK
  shard...
    error... ERROR timeout waiting for an event

Metricbeat ES module -

- module: elasticsearch
  metricsets:
    - ccr
    - cluster_stats
    - enrich
    - index
    - index_recovery
    - index_summary
    - ml_job
    - node_stats
    - shard
  period: 10s
  hosts: ["http://localhost:9200"]
  username: "${mb_monitoring_agent}"
  password: "${mb_remote_agent_pwd}"
  xpack.enabled: true

Metricbeat Config -

metricbeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false
setup.template.settings:
  index.number_of_shards: 2
  index.codec: best_compression
output.elasticsearch:
  hosts: ["https://elastic.monitor.com:443"]
  username: "${mb_monitoring_agent}"
  password: "${mb_remote_collection_pwd}"
  ssl.certificate_authorities: ["/etc/pki/tls/certs/rootCA.pem"]

Metricbeat Test output -

metricbeat test output
elasticsearch: https://elastic.monitor.com:443...
  parse url... OK
  connection...
    parse host... OK
    dns lookup... OK
    addresses: xxx.xxx.xxx.xxx
    dial up... OK
  TLS...
    security: server's certificate chain verification is enabled
    handshake... OK
    TLS version: TLSv1.2
    dial up... OK
  talk to server... OK
  version: 7.5.2


This issue stands resolved. It seems that some of the stats(index/ccr/cluster) are only collected by Master instance of ES cluster which is the reason ES module test was failing expect for nodes_stats.

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