Dbstats and collstats mongo db metric issues

Receiving errors for both collstat and dbstat when running metricbeat in docker container.

dbstats Error:
2018/08/17 22:31:22.444955 client.go:442: WARN Can not index event (status=400): {"type":"mapper_parsing_exception","reason":"object mapping for [mongodb.dbstats.avg_obj_size] tried to parse field [avg_obj_size] as object, but found a concrete value"}

collstats Error:
2018/08/17 22:44:04.386625 beat.go:339: CRIT Exiting: 1 error: metricset 'mongodb/collstats' is not registered, metricset not found
Exiting: 1 error: metricset 'mongodb/collstats' is not registered, metricset not fou

server in use: Ubunutu 16.04
Mongo version: 3.2.20
docker image : docker.elastic.co/beats/metricbeat 5.4.3
docker run command: docker run -d --volume=/usr/metricbeat/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml --volume=/proc:/hostfs/proc:ro --volume=/sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro --volume=/:/hostfs:ro --net=host docker.elastic.co/beats/metricbeat:5.4.3 metricbeat -e -system.hostfs=/hostfs


- module: mongodb
  hosts: [""]
  username: admin
  password: <password>
  metricsets: [ "collstats", "dbstats","status"]
  period: 10s
  enabled: true

  hosts: ["<elasticsearchhosts>"]
  index: "metricbeat-%{+yyyy.MM.dd}"

the 'status' metric is working fine and I'm seeing the data in elasticsearch... not sure why the other two metrics are not working.. please help!

It seems there is a conflict in the index mapping mixing an object with a different type.

I see that you removed the Beat version from the index pattern. This can potentially lead to conflicts if you have different Beats running. Can you try to send that to a fresh index and see if you still see the issue? Did you load the template for Metricbeat?

Also I would recommend you to use a more recent version of Metricbeat like 6.3.

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