Mongo DB and Mongo DB atlas

Plugin to grab stats from a server, database and its collections, supports Mongo DB atlas compatibility.


Ver. 25-08-2021

With this plug-in you can view the stats of a database and its collections, it supports Mongo DB atlas compatibility.

Tipo: Server plugin

Compatibility matrix

Systems where it has been tested

CentOS 7, Fedora

Systems where it should work

Any linux system





To use the plugin you will need to have a number of dependencies installed.

The first thing is to have python 3 installed

yum install python3

The plugin comes with a file called requirements.txt that will install the other necessary dependencies. To run it we will use:

pip3 install -r requirements.txt

However, if you want to install its dependencies without the requirements file, you can use the following commands (recommended if you don't use a Mongo DB atlas database)


python -m pip install pymongo


python -m pip install dnspython

note: dnspython is only required if you use a MongoDB atlas database.


To connect, you need to know your connection ip or uri. If you have set up the database in docker you can see it with :

docker inspect <id-contenedor>


The default port is usually 27017. For example with this ip the connection url would be :


For MongoDB atlas, we will need the connection string, this is obtained by doing the following.

Let's go to connect:


We will be presented with several options to connect:


For example, I have chosen MongoDB compass, and when I click on it, it will show us the connection string, if we have already installed it, or it will give us the option to install it.


That would be the connection string, obviously you would have to change <password> to your password.



General parameters

Execution command:

python pandora_mongodb -u <uri> -s <server> -d <databases> -a <alldatabases> -p <prefix> -c <collectionstats> [ -g <group> ] [ --data_dir <data dir> ] [ --as_agent_plugin 1]


If the execution is successful we will see an integer, which will be the database number we have.


If we want to run it as an agent plugin, we will do it using the optional parameter "as_agent_plugin" with a "1" which will return an xml with the data of our server: