My mongodb server running on local (127.0.0.1:27017). I have 2 user in mongodb database. 1 for application and 2nd user with read only permission. (Eg. user/password). I configure the 2nd user in mondodb.yml module, which present in "module.d" folder . But when i start my metric beat, it throw this error for mongodb.
ERROR ->
Errorfetchingdataformetricsetmongodb.metrics: failedtoapplyschema: 6errors: keymetrics.repl.executor.counters
notfound;keymetrics.repl.executor.queues.dbWorkInProgress
notfound;keymetrics.repl.executor.queues.exclusiveInProgress
notfound;keymetrics.repl.executor.queues.ready
notfound;keymetrics.repl.executor.queues.free
notfound;keymetrics.repl.executor.eventWaiters
notfound
XXXXXXXXXXXXXXXXXXXX my Mongodb.yml module configuration XXXXXXXXXXXXXXXXXXXXXX
Module: mongodb
Docs: https://www.elastic.co/guide/en/beats/metricbeat/7.3/metricbeat-module-mongodb.html
-
module: mongodb
#metricsets:- dbstats
- status
- collstats
- metrics
- replstatus
period: 10s
The hosts must be passed as MongoDB URLs in the format:
[mongodb://][user:pass@]host[:port].
The username and password can also be set using the respective configuration
options. The credentials in the URL take precedence over the username and
password configuration options.
hosts: ["localhost:27017"]
Optional SSL. By default is off.
#ssl.enabled: true
Mode of verification of server certificate ('none' or 'full')
#ssl.verification_mode: 'full'
List of root certificates for TLS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"
Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"
Username to use when connecting to MongoDB. Empty by default.
username: securaauser
Password to use when connecting to MongoDB. Empty by default.
password: password