Metricbeat not working when elasticsearch is upgraded from 7.4.0 to 7.5.0

Hi,
Im unable to set up monitoring for elastic search using metricbeat. It was working with version 7.4.0 but broke when upgraded to 7.5.0. I was sending metrics using metricbeat to separate monitoring cluster. Metricbeat logs are not useful. Is there any place i can check to see why its not working? Below are metric beat configs

# This file is an example configuration file highlighting only the most common
# options. The metricbeat.reference.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/metricbeat/index.html

#==========================  Modules configuration ============================

metricbeat.config.modules:
  # Glob pattern for configuration loading
  path: ${path.config}/modules.d/*.yml

  # Set to true to enable config reloading
  reload.enabled: false

  # Period on which files under path should be checked for changes
  #reload.period: 10s

#==================== Elasticsearch template setting ==========================

setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression
  #_source.enabled: false

#================================ General =====================================

# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:

# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]

# Optional fields that you can specify to add additional information to the
# output.
#fields:
#  env: staging


#============================== Dashboards =====================================
# These settings control loading the sample dashboards to the Kibana index. Loading
# the dashboards is disabled by default and can be enabled either by setting the
# options here or by using the `setup` command.
#setup.dashboards.enabled: false

# The URL from where to download the dashboards archive. By default this URL
# has a value which is computed based on the Beat name and version. For released
# versions, this URL points to the dashboard archive on the artifacts.elastic.co
# website.
#setup.dashboards.url:

#============================== Kibana =====================================

# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
# This requires a Kibana endpoint configuration.
setup.kibana:

# Kibana Host
# Scheme and port can be left out and will be set to the default (http and 5601)
# In case you specify and additional path, the scheme is required: http://localhost:5601/path
# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
#host: "localhost:5601"

# Kibana Space ID
# ID of the Kibana Space into which the dashboards should be loaded. By default,
# the Default Space will be used.
#space.id:

#============================= Elastic Cloud ==================================

# These settings simplify using Metricbeat with the Elastic Cloud (https://cloud.elastic.co/).

# The cloud.id setting overwrites the `output.elasticsearch.hosts` and
# `setup.kibana.host` options.
# You can find the `cloud.id` in the Elastic Cloud web UI.
#cloud.id:

# The cloud.auth setting overwrites the `output.elasticsearch.username` and
# `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
#cloud.auth:

#================================ Outputs =====================================

# Configure what output to use when sending the data collected by the beat.

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ['http://lx1176.mycompany.com', 'http://lx1177.mycompany.com']

  #----------------------------- Logstash output --------------------------------
  #output.logstash:
  # The Logstash hosts
  #hosts: ["localhost:5044"]

  # Optional SSL. By default is off.
  # List of root certificates for HTTPS server verifications

#================================ Processors =====================================

# Configure processors to enhance or manipulate events generated by the beat.

processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~

#================================ Logging =====================================

# Sets log level. The default log level is info.
# Available log levels are: error, warning, info, debug
#logging.level: debug

# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
#logging.selectors: ["*"]

#============================== X-Pack Monitoring ===============================
# metricbeat can export internal metrics to a central Elasticsearch monitoring
# cluster.  This requires xpack monitoring to be enabled in Elasticsearch.  The
# reporting is disabled by default.

# Set to true to enable the monitoring reporter.
#monitoring.enabled: false

# Sets the UUID of the Elasticsearch cluster under which monitoring data for this
# Metricbeat instance will appear in the Stack Monitoring UI. If output.elasticsearch
# is enabled, the UUID is derived from the Elasticsearch cluster referenced by output.elasticsearch.
#monitoring.cluster_uuid:

# Uncomment to send the metrics to Elasticsearch. Most settings from the
# Elasticsearch output are accepted here as well.
# Note that the settings should point to your Elasticsearch *monitoring* cluster.
# Any setting that is not set is automatically inherited from the Elasticsearch
# output configuration, so if you have the Elasticsearch output configured such
# that it is pointing to your Elasticsearch monitoring cluster, you can simply
# uncomment the following line.
#monitoring.elasticsearch:

#================================= Migration ==================================

# This allows to enable 6.7 migration aliases
#migration.6_to_7.enabled: true
- module: elasticsearch
  metricsets:
    - ccr
    - cluster_stats
    - index
    - index_recovery
    - index_summary
    - ml_job
    - node_stats
    - shard
  period: 10s
  hosts: ["https://localhost:9200"]
  username: "metricbeat_admin"
  password: *********
  xpack.enabled: true
  ssl.verification_mode: 'none'

Hi! Have you tried enabling debug level logs to see maybe if that will give more information?

logging.level: debug

Yes i did and this is what i see in metric beat log
2019-12-05T09:56:51.100-0600 INFO instance/beat.go:610 Home path: [/usr/share/metricbeat] Config path: [/etc/metricbeat] Data path: [/var/lib/metricbeat] Logs path: [/var/log/metricbeat]
2019-12-05T09:56:51.101-0600 DEBUG [beat] instance/beat.go:662 Beat metadata path: /var/lib/metricbeat/meta.json
2019-12-05T09:56:51.102-0600 INFO instance/beat.go:618 Beat ID: 6d10a960-0343-42fd-9c1c-366967b0231c
2019-12-05T09:56:51.105-0600 DEBUG [filters] add_cloud_metadata/providers.go:126 add_cloud_metadata: starting to fetch metadata, timeout=3s
2019-12-05T09:56:51.192-0600 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for az after 86.61406ms. result=[provider:az, error=failed with http status code 404, metadata={}]
2019-12-05T09:56:51.199-0600 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for openstack after 93.876122ms. result=[provider:openstack, error=failed with http status code 404, metadata={}]
2019-12-05T09:56:51.201-0600 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for digitalocean after 95.401323ms. result=[provider:digitalocean, error=failed with http status code 404, metadata={}]
2019-12-05T09:56:51.203-0600 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for aws after 97.989474ms. result=[provider:aws, error=failed with http status code 404, metadata={}]
2019-12-05T09:56:52.249-0600 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for gcp after 1.143497503s. result=[provider:gcp, error=failed with http status code 404, metadata={}]
2019-12-05T09:56:52.249-0600 DEBUG [filters] add_cloud_metadata/providers.go:129 add_cloud_metadata: fetchMetadata ran for 1.143588299s
2019-12-05T09:56:52.249-0600 INFO add_cloud_metadata/add_cloud_metadata.go:89 add_cloud_metadata: hosting provider type not detected.
2019-12-05T09:56:52.249-0600 DEBUG [processors] processors/processor.go:101 Generated new processors: add_host_metadata=[netinfo.enabled=[false], cache.ttl=[5m0s]], add_cloud_metadata=null

This is what i see when i test the metricbeat config

2019-12-05T10:08:19.829-0600 INFO instance/beat.go:610 Home path: [/usr/share/metricbeat/bin] Config path: [/usr/share/metricbeat/bin] Data path: [/usr/share/metricbeat/bin/data] Logs path: [/usr/share/metricbeat/bin/logs]
2019-12-05T10:08:19.830-0600 DEBUG [beat] instance/beat.go:662 Beat metadata path: /usr/share/metricbeat/bin/data/meta.json
2019-12-05T10:08:19.830-0600 INFO instance/beat.go:618 Beat ID: 359b575b-7dbb-43e1-a810-5b2df43d7174
2019-12-05T10:08:19.833-0600 DEBUG [filters] add_cloud_metadata/providers.go:126 add_cloud_metadata: starting to fetch metadata, timeout=3s
2019-12-05T10:08:19.906-0600 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for digitalocean after 72.814396ms. result=[provider:digitalocean, error=failed with http status code 404, metadata={}]
2019-12-05T10:08:19.924-0600 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for gcp after 90.579477ms. result=[provider:gcp, error=failed with http status code 404, metadata={}]
2019-12-05T10:08:20.901-0600 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for az after 1.067353419s. result=[provider:az, error=failed with http status code 404, metadata={}]
2019-12-05T10:08:20.903-0600 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for openstack after 1.069339639s. result=[provider:openstack, error=failed with http status code 404, metadata={}]
2019-12-05T10:08:20.904-0600 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for aws after 1.070892154s. result=[provider:aws, error=failed with http status code 404, metadata={}]
2019-12-05T10:08:20.904-0600 DEBUG [filters] add_cloud_metadata/providers.go:129 add_cloud_metadata: fetchMetadata ran for 1.070925886s
2019-12-05T10:08:20.904-0600 INFO add_cloud_metadata/add_cloud_metadata.go:89 add_cloud_metadata: hosting provider type not detected.
2019-12-05T10:08:20.904-0600 DEBUG [processors] processors/processor.go:101 Generated new processors: add_host_metadata=[netinfo.enabled=[false], cache.ttl=[5m0s]], add_cloud_metadata=null
2019-12-05T10:08:20.904-0600 INFO [beat] instance/beat.go:941 Beat info {"system_info": {"beat": {"path": {"config": "/usr/share/metricbeat/bin", "data": "/usr/share/metricbeat/bin/data", "home": "/usr/share/metricbeat/bin", "logs": "/usr/share/metricbeat/bin/logs"}, "type": "metricbeat", "uuid": "359b575b-7dbb-43e1-a810-5b2df43d7174"}}}
2019-12-05T10:08:20.904-0600 INFO [beat] instance/beat.go:950 Build info {"system_info": {"build": {"commit": "6d0d0ae079e5cb1d4f224801ac6df926dfb1594c", "libbeat": "7.5.0", "time": "2019-11-26T00:09:41.000Z", "version": "7.5.0"}}}
2019-12-05T10:08:20.904-0600 INFO [beat] instance/beat.go:953 Go runtime info {"system_info": {"go": {"os":"linux","arch":"amd64","max_procs":4,"version":"go1.12.12"}}}
2019-12-05T10:08:20.905-0600 INFO [beat] instance/beat.go:957 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-11-27T11:17:14-06:00","containerized":false,"name":"lx1171","ip":["127.0.0.1/8","::1/128","10.58.71.2/19","fe80::250:56ff:fe9f:8e43/64"],"kernel_version":"3.10.0-1062.4.3.el7.x86_64","mac":["00:50:56:9f:8e:43"],"os":{"family":"redhat","platform":"centos","name":"CentOS Linux","version":"7 (Core)","major":7,"minor":7,"patch":1908,"codename":"Core"},"timezone":"CST","timezone_offset_sec":-21600,"id":"b2774b3f7bbd4451b36d89c0951bc166"}}}
2019-12-05T10:08:20.906-0600 INFO [beat] instance/beat.go:986 Process info {"system_info": {"process": {"capabilities": {"inheritable":null,"permitted":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend"],"effective":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend"],"bounding":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend"],"ambient":null}, "cwd": "/usr/share/metricbeat/bin", "exe": "/usr/share/metricbeat/bin/metricbeat", "name": "metricbeat", "pid": 91285, "ppid": 91275, "seccomp": {"mode":"disabled","no_new_privs":false}, "start_time": "2019-12-05T10:08:19.370-0600"}}}
2019-12-05T10:08:20.906-0600 INFO instance/beat.go:297 Setup Beat: metricbeat; Version: 7.5.0
2019-12-05T10:08:20.906-0600 DEBUG [beat] instance/beat.go:323 Initializing output plugins
2019-12-05T10:08:20.906-0600 INFO [index-management] idxmgmt/std.go:182 Set output.elasticsearch.index to 'metricbeat-7.5.0' as ILM is enabled.
2019-12-05T10:08:20.906-0600 INFO elasticsearch/client.go:171 Elasticsearch url: http://lx1176.mycompany.com:9200
2019-12-05T10:08:20.906-0600 INFO elasticsearch/client.go:171 Elasticsearch url: http://lx1177.mycompany.com:9200
2019-12-05T10:08:20.906-0600 DEBUG [publisher] pipeline/consumer.go:137 start pipeline event consumer
2019-12-05T10:08:20.907-0600 INFO [publisher] pipeline/module.go:97 Beat name: lx1171
2019-12-05T10:08:20.907-0600 DEBUG [modules] beater/metricbeat.go:121 Available modules and metricsets: Register [ModuleFactory:[aws, azure, beat, docker, elasticsearch, kibana, logstash, mongodb, mssql, mysql, oracle, postgresql, system, uwsgi], MetricSetFactory:[aerospike/namespace, apache/status, appsearch/stats, aws/cloudwatch, aws/ec2, aws/rds, aws/s3_daily_storage, aws/s3_request, aws/sqs, azure/compute_vm, azure/compute_vm_scaleset, azure/monitor, beat/state, beat/stats, ceph/cluster_disk, ceph/cluster_health, ceph/cluster_status, ceph/monitor_health, ceph/osd_df, ceph/osd_tree, ceph/pool_disk, consul/agent, coredns/stats, couchbase/bucket, couchbase/cluster, couchbase/node, couchdb/server, docker/container, docker/cpu, docker/diskio, docker/event, docker/healthcheck, docker/image, docker/info, docker/memory, docker/network, dropwizard/collector, elasticsearch/ccr, elasticsearch/cluster_stats, elasticsearch/enrich, elasticsearch/index, elasticsearch/index_recovery, elasticsearch/index_summary, elasticsearch/ml_job, elasticsearch/node, elasticsearch/node_stats, elasticsearch/pending_tasks, elasticsearch/shard, envoyproxy/server, etcd/leader, etcd/metrics, etcd/self, etcd/store, golang/expvar, golang/heap, graphite/server, haproxy/info, haproxy/stat, http/json, http/server, jolokia/jmx, kafka/consumergroup, kafka/partition, kibana/stats, kibana/status, kubernetes/apiserver, kubernetes/container, kubernetes/controllermanager, kubernetes/event, kubernetes/node, kubernetes/pod, kubernetes/proxy, kubernetes/scheduler, kubernetes/state_container, kubernetes/state_cronjob, kubernetes/state_deployment, kubernetes/state_node, kubernetes/state_pod, kubernetes/state_replicaset, kubernetes/state_resourcequota, kubernetes/state_statefulset, kubernetes/system, kubernetes/volume, kvm/dommemstat, logstash/node, logstash/node_stats, memcached/stats, mongodb/collstats, mongodb/dbstats, mongodb/metrics, mongodb/replstatus, mongodb/status, mssql/performance, mssql/transaction_log, munin/node, mysql/galera_status, mysql/status, nats/connections, nats/routes, nats/stats, nats/subscriptions, nginx/stubstatus, oracle/performance, oracle/tablespace, php_fpm/pool, php_fpm/process, postgresql/activity, postgresql/bgwriter, postgresql/database, postgresql/statement, prometheus/collector, rabbitmq/connection, rabbitmq/exchange, rabbitmq/node, rabbitmq/queue, redis/info, redis/key, redis/keyspace, statsd/server, system/core, system/cpu, system/diskio, system/entropy, system/filesystem, system/fsstat, system/load, system/memory, system/network, system/process, system/process_summary, system/raid, system/socket, system/socket_summary, system/uptime, traefik/health, uwsgi/status, vsphere/datastore, vsphere/host, vsphere/virtualmachine, zookeeper/connection, zookeeper/mntr, zookeeper/server], LightModules:]
Config OK

Hi @Kaiyan_Sheng any thoughts on why metricbeat 7.5 is not collecting metrics? I dont see any errors in the logs. I tried all the troubleshooting steps but still not able to identify. Any help is greatly appreciated. Thanks!

Hey
I am getting the same error but in Filebeat. Can some one please guide us.

Thanks,
Tahseen

I finally got this working in case anyone is facing the same issue.The logs obviously didn't print the error i was getting. So i ran the command journalctl -u metricbeat and it had the exception
Exiting: The elasticsearch module with xpack.enabled: true must have metricsets: [ccr enrich cluster_stats index index_recovery index_summary ml_job node_stats shard]. I was missing the metric set enrich which didn't casue an issue with 7.4 but stopped working when upgraded to 7.5. So adding that metric set did fix the issue.

Error Solved.
I also solved my error.
It was not giving any logs because system module was not enabled.
So I enable the system module and run it again. I was able to see the output in kibana.

Thanks,
Tahseen

1 Like

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