Unable to start the metric beat in ELK 6.5.4


(subhash) #1

Hi Team,

I have successfully installed and enabled mongod module for metricbeat in elk 6.5.4

while starting the metricbeat facing below error and i have checked metricbeat.yml file seems fine.

**Error Log: **
2018-11-30T06:21:51.508Z ERROR cfgfile/reload.go:223 Error loading config: invalid config: yaml: line 4: mapping values are not allowed in this context
2018-11-30T06:21:51.510Z INFO [monitoring] log/log.go:152 Total non-zero metrics {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":20,"time":{"ms":27}},"total":{"ticks":50,"time":{"ms":63},"value":50},"user":{"ticks":30,"time":{"ms":36}}},"handles":{"limit":{"hard":4096,"soft":1024},"open":7},"info":{"ephemeral_id":"6bc3ff29-25df-4e55-b78d-c69a8ee421a7","uptime":{"ms":45}},"memstats":{"gc_next":4981776,"memory_alloc":3535312,"memory_total":9285336,"rss":23425024}},"libbeat":{"config":{"module":{"running":0}},"output":{"type":"elasticsearch"},"pipeline":{"clients":0,"events":{"active":0}}},"system":{"cpu":{"cores":2},"load":{"1":0.01,"15":0.05,"5":0.02,"norm":{"1":0.005,"15":0.025,"5":0.01}}}}}}
2018-11-30T06:21:51.510Z INFO [monitoring] log/log.go:153 Uptime: 46.642506ms
2018-11-30T06:21:51.510Z INFO [monitoring] log/log.go:130 Stopping metrics logging.
2018-11-30T06:21:51.510Z INFO instance/beat.go:410 metricbeat stopped.
2018-11-30T06:21:51.513Z ERROR instance/beat.go:800 Exiting: 1 error: invalid config: yaml: line 4: mapping values are not allowed in this context

Please help me to resolve the issue?

Thanks in advance.


(Christian Dahlqvist) #2

As the error message is complaining about the config, it would help if you showed it.


(subhash) #3

Below is my metric beat yml file

cat /etc/metricbeat/metricbeat.yml

#========================== 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 =====================================

#============================== Dashboards =====================================

#============================== 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"

#================================ 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: ["localhost:9200"]

Optional protocol and basic auth credentials.

#protocol: "https"
username: ""
password: "
"

#----------------------------- Logstash output --------------------------------

#================================ Procesors =====================================

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

processors:

  • add_host_metadata: ~
  • add_cloud_metadata: ~

#============================== Xpack Monitoring ===============================

xpack.monitoring.enabled: true

xpack.monitoring.elasticsearch:


(Christian Dahlqvist) #4

Please use the </> tool in the UI to format the config properly. As it is now it is very hard to read, which may make it hard to spot any issues.


(subhash) #5
   #==========================  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


#============================== 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"

  

#================================ 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: ["localhost:9200"]

  # Optional protocol and basic auth credentials.
  #protocol: "https"
   username: "qqqq"
   password: "qqqq"


#================================ Procesors =====================================

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

processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~



#============================== Xpack Monitoring ===============================

xpack.monitoring.enabled: true

xpack.monitoring.elasticsearch:

(subhash) #6

@Christian_Dahlqvist

any config issue with above yaml code ?


(Christian Dahlqvist) #7

What does the config file for the module look like?


(subhash) #8

/etc/metricbeat/metricbeat.yml


(Kaiyan Sheng) #9

Based on the error message, it seems to be complaining about the config file maybe specifically to mongodb. Can you show us what's the config.yml look like for mongodb please?


(system) closed #10

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