In the profiles tab, click on ADD PROFILE and give it a name.

Fill in the fields accordingly.

Field name

Supported values

Description

Example

Connection stringValid connection stringConnection string to the MongoDB databasemongodb://192.168.0.40:27017/?directConnection=true
Database nameAny stringName of the database to connect totest
Collection nameAny stringName of the collection to extract data fromaudit_data

Database user

Any string

MongoDB user. Leave blank if the MongoDB doesn't require authentication.


Database password

Any string

MongoDB user's password. Leave blank if the MongoDB doesn't require authentication.


QueryValid MongoDB query.Query to be executed. The $value placeholder will get replaced with the value of a field in the last message from the last poll cycle or with a default value.{ "timestamp": { "$gt": { "$date" : "$value" } }}

Field parameter (optional)

Any string

An existing message field name. The value of this field will replace the $value placeholder in the query.

timestamp/$date
Field default value (optional)Any stringStarting parameter value (needs to be valid)2022-12-15T08:20:16.702+00:00
ProjectionComma-separated listDetermines which fields from the result to select in the output. Leave blank to get all fields.action,status,objectname,objectid
SortComma-separated listDetermines the order of the results in the output. Leave blank for any sorting.

{"timestamp": 1}

Message typeAny string1Gateway message type of the MongoDB recordsMongoDBMessage
Polling interval (in seconds)IntegerRecommended: 86,400 (once a day)86400

Examples of MongoDB queries and their meaning:

Example 1

Getting data where the timestamp is greater than the previous value (timestamp/$date in the last message from the last poll cycle). If the last message from the last poll cycle doesn't contain a timestamp or its the first poll cycle, the value will default to the Field default value. 

Field name

Example

Query{ "timestamp": { "$gt": ISODate("$value") }}

Field parameter (optional)

timestamp/$date
Field default value (optional)2022-12-15T08:20:16.702+00:00
Sort

{ "timestamp": 1}

Example 2

Getting data of a specific objecttype (plugin) and where the timestamp is greater than  the previous value (timestamp/$date in the last message from the last poll cycle). If the last message from the last poll cycle doesn't contain a timestamp or its the first poll cycle, the value will default to the Field default value. 

Field name

Example

Query{
 "objecttype": "plugin",
 "timestamp": {
    "$gt": 
      ISODate("$value")
  }
}

Field parameter (optional)

timestamp/$date
Field default value (optional)2022-12-15T08:20:16.702+00:00
Sort

{ "timestamp": 1}

Example 3

Getting data of a specific objecttype (plugin or mapper) and where the timestamp is greater than  the previous value (timestamp/$date in the last message from the last poll cycle). If the last message from the last poll cycle doesn't contain a timestamp or its the first poll cycle, the value will default to the Field default value. 

Field name

Example

Query{
  "$and": [
    { "objecttype": {
        "$exists": true,
        "$in": ["plugin", "mapper"]
        } 
    },
    { "timestamp": { "$gt": ISODate("2022-04-20 10:04:16.702Z") }}
  ]
}

Field parameter (optional)

timestamp/$date
Field default value (optional)2022-12-15T08:20:16.702+00:00
Sort

{ "timestamp": 1}

Example 4

Getting data of a specific objecttype (any existing value except for plugin) and where the timestamp is greater than  the previous value (timestamp/$date in the last message from the last poll cycle). If the last message from the last poll cycle doesn't contain a timestamp or its the first poll cycle, the value will default to the Field default value. 

Field name

Example

Query{
  "$and": [
    { "objecttype": { "$ne": "plugin" } },
    { "objecttype": { "$exists": true } },
    { "objecttype": { "$ne": null } },
    { "timestamp": { "$gt": ISODate("$value") }}
  ]
}

Field parameter (optional)

timestamp/$date
Field default value (optional)2022-12-15T08:20:16.702+00:00
Sort

{ "timestamp": 1}