Not explainable error: export metrics to mongo - MongoDB support isn't compiled

Could you help me to debug the following as I can not export metrics to the MongoDB. The errors seems not too explainable. Thank you in advance.

  1. I have installed libmongoc-1.0-0 libmongoc-dev > 1.7
  2. I have reinstalled netdata using the script multiple times
  3. My exporting.conf looks like this:
[mongodb:my_mongodb_instance]
    enabled = yes
    destination = mongodb://user123:pass123@localhost:27017/?authSource=admin
    database = netdata
    collection = netdata_metrics
  1. My mongodb error.log is the following:
2022-10-13 13:16:57: netdata INFO  : EXPORTING : Processing connector instance (my_mongodb_instance)
2022-10-13 13:16:57: netdata INFO  : EXPORTING : Instance (my_mongodb_instance) on connector (mongodb) is enabled and scheduled for activation
2022-10-13 13:16:57: netdata INFO  : EXPORTING : Instance my_mongodb_instance on mongodb
2022-10-13 13:16:57: go.d INFO: main[main] looking for 'mongodb.conf' in [/etc/netdata/go.d /usr/lib/netdata/conf.d/go.d]
2022-10-13 13:16:57: go.d INFO: main[main] found '/usr/lib/netdata/conf.d/go.d/mongodb.conf
2022-10-13 13:16:59: python.d INFO: plugin[main] : [mongodb] built 1 job(s) configs
2022-10-13 13:16:59: python.d ERROR: mongodb[local] : Pymongo package v2.4+ is needed to use mongodb.chart.py
2022-10-13 13:16:59: python.d INFO: plugin[main] : mongodb[local] : check failed
2022-10-13 13:17:00: go.d INFO: build[manager] mongodb[local] job last state is active/retry, applying recovering settings
2022-10-13 13:17:00: go.d INFO: mongodb[local] initializing mongodb
2022-10-13 13:17:00: go.d INFO: mongodb[local] check success
2022-10-13 13:17:00: go.d INFO: mongodb[local] started, data collection interval 1s
2022-10-13 13:17:00: go.d ERROR: prometheus[mongodb_exporter_local] Get "http://127.0.0.1:9216/metrics": dial tcp 127.0.0.1:9216: connect: connection refused
2022-10-13 13:17:00: go.d ERROR: prometheus[mongodb_exporter_local] check failed
2022-10-13 13:17:00: go.d ERROR: prometheus[mongodb_query_exporter_local] Get "http://127.0.0.1:9736/metrics": dial tcp 127.0.0.1:9736: connect: connection refused
2022-10-13 13:17:00: go.d ERROR: prometheus[mongodb_query_exporter_local] check failed
  1. Using the same destination URI, I can connect to my mongodb using MongoDB Compass app and I can see my databases.

  2. I can not paste my error.log of netdata here due to the words limit, but the only relevant error that I could see about mono was about: MongoDB support isn’t compiled

Hi @Panos_Petrop sorry for delay here.

Let me see who can help here.

In meantime i wonder if anything in here might help:

Please try reinstalling Netdata using sudo netdata-installer.sh --enable-exporting-mongodb

1 Like