# Unable to start the metric beat in ELK 6.5.4

**URL:** https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859
**Category:** Beats
**Tags:** metricbeat
**Created:** [November 30, 2018, 6:35am UTC](https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859 "2018-11-30T06:35:02Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![subhash.parise](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@subhash.parise](https://discuss.elastic.co/u/subhash.parise)
#### Post date: [November 30, 2018, 6:35am UTC](https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859/1 "2018-11-30T06:35:02Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [November 30, 2018, 6:44am UTC](https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859/2 "2018-11-30T06:44:44Z")

</div>

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

---

<div class="post-metadata">

### Author: ![subhash.parise](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@subhash.parise](https://discuss.elastic.co/u/subhash.parise)
#### Post date: [November 30, 2018, 6:53am UTC](https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859/3 "2018-11-30T06:53:43Z")

</div>

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](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:

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [November 30, 2018, 6:55am UTC](https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859/4 "2018-11-30T06:55:25Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![subhash.parise](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@subhash.parise](https://discuss.elastic.co/u/subhash.parise)
#### Post date: [November 30, 2018, 7:00am UTC](https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859/5 "2018-11-30T07:00:23Z")

</div>

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

---

<div class="post-metadata">

### Author: ![subhash.parise](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@subhash.parise](https://discuss.elastic.co/u/subhash.parise)
#### Post date: [November 30, 2018, 7:23am UTC](https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859/6 "2018-11-30T07:23:43Z")

</div>

@Christian_Dahlqvist

any config issue with above yaml code ?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [November 30, 2018, 7:27am UTC](https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859/7 "2018-11-30T07:27:15Z")

</div>

What does the config file for the module look like?

---

<div class="post-metadata">

### Author: ![subhash.parise](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@subhash.parise](https://discuss.elastic.co/u/subhash.parise)
#### Post date: [November 30, 2018, 7:28am UTC](https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859/8 "2018-11-30T07:28:29Z")

</div>

/etc/metricbeat/metricbeat.yml

---

<div class="post-metadata">

### Author: ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)
#### Post date: [December 1, 2018, 3:21am UTC](https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859/9 "2018-12-01T03:21:30Z")

</div>

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?

---

<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: [December 29, 2018, 3:21am UTC](https://discuss.elastic.co/t/unable-to-start-the-metric-beat-in-elk-6-5-4/158859/10 "2018-12-29T03:21:34Z")

</div>

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