Document toolboxDocument toolbox

MongoDB

[ 1 Connect MongoDB with Devo SOAR ] [ 2 Actions for MongoDB ] [ 2.1 Query MongoDB (Deprecated) ] [ 2.1.1 Input Field ] [ 2.1.2 Output ] [ 2.2 Query MongoDB ] [ 2.2.1 Input Field ] [ 2.2.2 Output ] [ 2.3 Aggregate ] [ 2.3.1 Input Field ] [ 2.3.2 Output ] [ 3 Release Notes ]

MongoDB is a free and open-source cross-platform document-oriented database.

Connect MongoDB with Devo SOAR

  1. Navigate to Automations > Integrations.

  2. Search for MongoDB.

  3. Click Details, then the + icon. Enter the required information in the following fields.

  4. Label: Enter a connection name.

  5. Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.

  6. Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).

  7. Remote Agent: Run this integration using the Devo SOAR Remote Agent.

  8. Server IP or Hostname for MongoDB: Enter server's IP or Hostname where MongoDB is installed and the instance is running.

  9. Port number for MongoDB: Enter the port number for MongoDB instance.

  10. Enter database name: Database name for MongoDB.

  11. Enter collection name: Collection name for MongoDB.

  12. Username: Username for MongoDB.

  13. Password: Password for MongoDB.

  14. After you've entered all the details, click Connect.

Actions for MongoDB

Query MongoDB (Deprecated)

Submits the given query to MongoDB and retrieves the result.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input Name

Description

Required

Input Name

Description

Required

Query for MongoDB

Enter the query string for the find operation. If you want to project certain fields provide them as comma-separated strings.

 

Example: {"_id": "5"} or ip_address, _id

Required

 

Output

mongodb matched documents returned as multiple rows (uncorrelated).

  • has_error: True/False

  • error: message/null

  • other keys of mongodb document

Query MongoDB

Submits the given query to MongoDB and retrieves the result. Learn more on querying documents https://docs.mongodb.com/manual/tutorial/query-documents/

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input Name

Description

Required

Input Name

Description

Required

Query for MongoDB

Enter jinja-templated MongoDB query.

 

Examples:

 

 

{}

 

 

{"mongo_col":"{{col_value}}"}

 

 

{"mongo_col":"{{col_value}}"}, {"mongo_col": 1, "mongo_col1": 1, "mongo_col2": 1}

 

 

* Limit (Optional): Limit number of results returned by running the above MongoDB query. (Default is 1000 results)

 

 

Output

mongodb matched documents returned as multiple rows (correlated).

  • has_error: True/False

  • error: message/null

  • other keys of mongodb document

Aggregate

Performs an aggregate operation on MongoDB collections object.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input Name

Description

Required

Input Name

Description

Required

Pipeline

Enter jinja-templated pipeline for the aggregate operation.

 

Example:

 

 

[{"$match": {}}, {"$project": {"{{field_column}}": 1}}, {"$sort": {"{{field_column}}": -1, "_id": -1}}]

Required

 

Output

mongodb matched documents returned as multiple rows (correlated).

  • has_error: True/False

  • error: message/null

  • other keys of mongodb document

Release Notes

  • v3.0.0 - Updated architecture to support IO via filesystem