MongoDB Telemetry Data to KloudMate Using OpenTelemetry Collector
This document provides a guide on how to send MongoDB telemetry data to KloudMate using OpenTelemetry Collector.
In the described setup, the latest MongoDB instance is running on an EC2 server. An exporter is required to export metrics to a monitoring backend. In this process, the metrics will be exported by the MongoDB exporter and the penTelemetry collector will be responsible to send metrics data to KloudMate backend.
Step 1: Prerequisites:
Recommendations: Install otelcol-contrib releases.
Step 2: Install and configure MongoDB exporter:
- Add user and group for exporter
- Download and extract MongoDB Exporter
- Enable MongoDB authentication
- Create a system file for the MongoDB exporter and run it as a service.
Step 3: Test the available metrics.
Step 4: On the OpenTelemetry collector add the MongoDB exporter path on Prometheus receiver and export to KloudMate backend.
Step 5: For logs, OpenTelemetry has a file log receiver that can export logs written on a file to a specific backend. Add the file log receiver and include the path of the file which needs to be exported.
If the collector is unable to send logs after these configurations then this might be the permission issue for the otelcol-contrib. Edit the otelcol-contrib service at /lib/systemd/system/otelcol-contrib.service and change the user and group to root.