# Discovery

This plugin can be integrated with Pandora FMS Discovery.

To do so, you must install the ".disco" package, which you can download from the Pandora FMS repository:

[https://pandorafms.com/library/](https://pandorafms.com/library/)

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2023-10/scaled-1680-/HI1image.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2023-10/HI1image.png)

Once loaded, you can monitor MongoDB environments by creating Discovery tasks from the Management &gt; Discovery &gt; Applications section.

For each task, the following minimum information will be required:

- **MongoDB target strings :** List of target instances, separated by commas or new lines. You must specify the connection URI for each one. Example: mongodb://172.17.0.2:27017 or [mongodb://monitor\_user:s3cur3P@ss@mongo-prod-01.internal.company.com:27017/monitoring?authSource=admin](mongodb://monitor_user:s3cur3P@ss@mongo-prod-01.internal.company.com:27017/monitoring?authSource=admin).  
      
    If you want to monitor specific databases within an instance, you must specify them using "|" and separate each database with ";".
    
    Example:
    
    ```
    mongodb://172.17.0.7:27017|pandora_db;pandora_db2
    ```
    
    If you want to exclude specific databases from a query, you must specify them using "|" and separate each database with ";", including an exclamation mark ! before the "|" :
    
    Example :
    
    ```
    mongodb://172.17.0.7:27017!|pandora_db;pandora_db2
    ```

[![Captura desde 2026-02-04 14-13-37.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-02/scaled-1680-/captura-desde-2026-02-04-14-13-37.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-02/captura-desde-2026-02-04-14-13-37.png)

You can also adjust the task settings to customize the monitoring as desired:

- **Max threads**: <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">To optimize execution time, multiple threads can be configured to monitor the task's agents.</span></span> <span class="jCAhz ChMk0b"><span class="ryNqvb">Note that configuring multiple threads may increase the task's CPU usage.</span></span></span>
- **Target agent**: <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">List of target agents for the MongoDB targets to be monitored.</span></span> <span class="jCAhz ChMk0b"><span class="ryNqvb">These are the names that will be used to generate the agents for each target defined in the task.</span></span> <span class="jCAhz ChMk0b"><span class="ryNqvb">This will be a comma-separated or line-separated list.</span></span> <span class="jCAhz ChMk0b"><span class="ryNqvb">The position of the names in the list must match the position of the MongoDB targets in their respective lists; that is, the first name will be used for the first target, and so on.</span></span> <span class="jCAhz ChMk0b"><span class="ryNqvb">If the list is line-separated, blank lines will be ignored.</span></span> <span class="jCAhz ChMk0b"><span class="ryNqvb">If no agent name is specified for a target, its name will be used as the agent name.</span></span></span>
- **Use prefix for modules:** <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Enable this token to be able to specify a custom prefix for the created modules.</span></span></span>
- **Custom prefix for modules:** <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Prefix for created modules.</span></span></span>
- **Scan databases:** <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Enable this token to monitor the databases of the configured instances.</span></span></span>
- **Create agent per database:** <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Enable this token to generate one agent for each database generated.</span></span></span>
- **Custom database agent prefix:** Prefix for the created database agents. [![Captura desde 2026-03-30 16-08-03.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/scaled-1680-/TmPcaptura-desde-2026-03-30-16-08-03.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/TmPcaptura-desde-2026-03-30-16-08-03.png)
- **Check engine uptime**: If enabled, this will monitor the uptime of the targets.
- **Retrieve query statistics:** If enabled, this will monitor query statistics.
- **Analyze connections:** If enabled, this will monitor connections.
- **Retrieve latency statistics:** If enabled, this will monitor latency.
- **Retrieve network statistics:** If enabled, this will monitor networks.

[![Captura desde 2026-02-04 14-36-32.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-02/scaled-1680-/captura-desde-2026-02-04-14-36-32.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-02/captura-desde-2026-02-04-14-36-32.png)

Finally, you can configure custom queries in the last step of the task (optional).

- **Run custom queries**: If enabled, this allows you to run custom queries.
- **Custom queries:** In this window, you can specify the custom modules with the desired custom queries (see the "Parameters" section for the correct configuration syntax)

[![Captura desde 2026-02-04 14-16-07.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-02/scaled-1680-/captura-desde-2026-02-04-14-16-07.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-02/captura-desde-2026-02-04-14-16-07.png)

Tasks that are successfully completed will include an execution summary containing the following information:

- **Total agents:** Total number of agents generated by the task.
- **Targets up:** Total number of targets that could be connected to.
- **Targets down:** Total number of targets that could not be connected to.

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2023-10/scaled-1680-/B2Qimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2023-10/B2Qimage.png)

Tasks that are not completed successfully will include an execution summary listing the errors that occurred.