# MongoDB

### Supported Platforms

| Platform | Metrics | Logs | Traces |
| -------- | ------- | ---- | ------ |
| Linux    | ✓       | ✓    |        |
| Windows  | ✓       | ✓    |        |
| macOS    | ✓       | ✓    |        |

### Prerequisites

This source supports MongoDB versions 4.0+, 5.0, 6.0, and 7.0.

### Configuration Table

<table><thead><tr><th>Parameter</th><th width="182.30859375">Type</th><th width="363.23046875">Default</th><th width="277.671875">Description</th></tr></thead><tbody><tr><td>telemetry_types</td><td><code>telemetrySelector</code></td><td><code>["Logs", "Metrics"]</code></td><td>Choose Telemetry Type.</td></tr><tr><td>log_paths</td><td><code>strings</code></td><td><ul><li><code>\"/var/log/mongodb/mongodb.log_\"</code></li><li><code>\"/var/log/mongodb/mongod.log_\"</code></li></ul></td><td>Path to Mongodb log file(s).</td></tr><tr><td>start_at</td><td><code>enum</code></td><td>end</td><td>Start reading the file from the 'beginning' or 'end'.</td></tr><tr><td>hosts</td><td><code>strings</code></td><td>"localhost:27017"</td><td><p>List of host:port or unix domain socket endpoints.</p><ul><li>For standalone MongoDB deployments this is the hostname and port of the mongod instance.</li><li>For replica sets specify the hostnames and ports of the mongod instances that are in the replica set configuration. If the replica_set field is specified, nodes will be auto discovered.</li><li>For a sharded MongoDB deployment, please specify a list of the mongos hosts.</li></ul></td></tr><tr><td>username</td><td><code>string</code></td><td></td><td>If authentication is required, specify a username with "clusterMonitor" permission.</td></tr><tr><td>password</td><td><code>string</code></td><td></td><td>The password user's password.</td></tr><tr><td>collection_interval</td><td><code>int</code></td><td>60</td><td>Sets how often (seconds) to scrape for metrics.</td></tr><tr><td>enable_tls</td><td><code>bool</code></td><td>false</td><td>Whether or not to use TLS.</td></tr><tr><td>insecure_skip_verify</td><td><code>bool</code></td><td>false</td><td>Enable to skip TLS certificate verification.</td></tr><tr><td>ca_file</td><td><code>string</code></td><td></td><td>Certificate authority used to validate the database server's TLS certificate.</td></tr><tr><td>cert_file</td><td><code>string</code></td><td></td><td>A TLS certificate used for client authentication if mutual TLS is enabled.</td></tr><tr><td>key_file</td><td><code>string</code></td><td></td><td>A TLS private key used for client authentication if mutual TLS is enabled.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/integrations/sources/mongodb.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
