# MongoDB

Server metrics, the server log and slow operations.

Metrics Logs Available

[Open the Connect card in Epok](https://app.epok.cloud/#/connect) [Full setup guide](https://epok.cloud/docs/install/mongodb)

## What you get

Metrics and logs, arriving through OpenTelemetry Collector (mongodb receiver and server log) over OTLP.

## Set it up

1. Create a read-only monitoring user on MongoDB, as the install guide shows.
2. Install the OpenTelemetry Collector (contrib) on a host that can reach the database.
3. Copy the MongoDB recipe from the install guide; it reads the monitoring password and your Epok key from the collector's environment file.
4. Start the collector. Metrics and new server-log lines reach Epok over OTLP within a minute.

The commands and configuration for each step are on the [setup guide](https://epok.cloud/docs/install/mongodb).

## What was tested

- Code tests of the ingest route or the sender: 2 tests.
- No run against the hosted service is recorded yet.

## What you see in Epok

- Metrics: browse, chart and alert on every series by its labels.
- Explore and Live tail: search, patterns and new errors.

## Troubleshooting

- No metrics: check the collector's own log for connection or authentication errors from the receiver.
- TLS errors: the recipe verifies the server certificate; point ca\_file at the CA that signed it.

## More in Databases

[PostgreSQL](https://epok.cloud/integrations/postgresql) [MySQL and MariaDB](https://epok.cloud/integrations/mysql) [Redis](https://epok.cloud/integrations/redis)
