You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -246,9 +242,11 @@ By default, the collection starts from the current date and time, but this setti
246
242
### Step 1: Acquire Authentication Info from MongoDB Atlas Portal
247
243
248
244
This section shows you how to acquire MongoDB Atlas portal authentication information. Generate programmatic API Keys with project owner permissions using the instructions in the Atlas [documentation](https://docs.atlas.mongodb.com/configure-api-access/#create-an-api-key-for-a-project). Then, copy the public key and private key. These serve the same function as a username and API Key, respectively.
249
-
1. Generate programmatic API Keys with project owner permissions using the instructions in the Atlas [documentation](https://docs.atlas.mongodb.com/configure-api-access/#create-an-api-key-for-a-project). Then, copy the public key and private key. These serve the same function as a username and API Key respectively.
245
+
1. Generate programmatic API Keys with project owner permissions using the instructions in the Atlas [documentation](https://docs.atlas.mongodb.com/configure-api-access/#create-an-api-key-for-a-project). Then, copy the public key and private key. These serve the same function as a username and API Key respectively. You may also have to configure [ip access list](https://www.mongodb.com/docs/atlas/configure-api-access-org/#edit-the-api-access-list) for the host from which you want Atlas to accept API requests.
246
+
<img src={useBaseUrl('img/integrations/databases/mongodbatlas/createapikey.png')} alt="MongoDB Atlas create api key" />
250
247
2. Specify the API key **Organization Member** permissions, under **Organization > Access Manager > API Keys**, as shown in the following example.
251
248
3. Go to **Project Settings** > **Access Manager** > **API Keys** and then click on **Invite To Project** to add the API key created above for this project as shown in the following example.
249
+
<img src={useBaseUrl('img/integrations/databases/mongodbatlas/invitetoproject.png')} alt="MongoDB Atlas invite to project" />
252
250
4. Specify **Project Data Access Read Only** permission, under **Project Settings > Access Manager > API Keys**, as shown in the following example.
253
251
5. Go to your project, click **Settings**, and copy the **Project ID**, as shown in the following example.
254
252
6. Go to your organization by using context dropdown at the top, click **Settings**, and copy the **Organization ID**.
@@ -281,7 +279,7 @@ In this section, we explore various mechanisms to collect database logs, events,
281
279
A single instance of the collector is responsible for collecting logs from a single project. Refer to [Configure Collection for Multiple Projects](#step-3b-configure-collection-for-multiple-projects-optional) if you have multiple projects.
282
280
283
281
284
-
#### Step 3A: Deploy the Sumo Logic MongoDB Atlas SAM application
282
+
#### Deploy the Sumo Logic MongoDB Atlas SAM application
285
283
286
284
In this section, you deploy the SAM application, which creates the necessary resources in your AWS account. To deploy the Sumo Logic MongoDB Atlas SAM application, do the following:
287
285
1. Go to [https://serverlessrepo.aws.amazon.com/applications](https://serverlessrepo.aws.amazon.com/applications).
@@ -323,18 +321,21 @@ In this section, you deploy the SAM application, which creates the necessary res
323
321
324
322
The lambda function should be working now in sending logs to Sumo. You can check the CloudWatch logs in **Monitor** > **Logs** to see the logs of the function.
325
323
326
-
#### Step 3B: Configure Collection for Multiple Projects (optional)
327
-
328
-
This section shows you how to configure collection for multiple projects, assuming you are already collecting Atlas data for one project. This task requires that you do the following:
329
-
* Stop the collection of OrgEvents in the second SAM app deployment, because these events are global and are already captured by first collector.
330
-
* Change the `DBNAME` so that state (keys) maintained (bookkeeping) in the database (key value store) are not in conflict.
324
+
13. Configuring collection for multiple projects (assuming you are already collecting Atlas data for one project). This task requires that you do the following:
331
325
332
-
To configure collection for multiple projects, do the following:
333
326
1.[Deploy the MongoDB Atlas SAM application](#step-3a-deploy-the-sumo-logic-mongodb-atlas-sam-application) with the configuration for a new project.
334
-
2. After the deployment is complete, change the database name by adding environment variable (`DBNAME`) in [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/env_variables.html), as shown in the following example.
335
-
3. From the Lambda console, go to the **mongodbatlas.yaml** file and comment out `EVENTS_ORG`, as shown in the following example. This prevents the collection of org events, because they are already being collected by the first collector.
327
+
2. From the Lambda console, go to the **mongodbatlas.yaml** file and comment out `EVENTS_ORG`, as shown in the following example. This prevents the collection of `Organisation Events` in the second SAM app deployment, because these events are global and are already captured by first collector.
336
328
337
-
#### Step 3C: Configure Script-Based Collection for MongoDB Atlas
329
+
14. By default the solution collects all log types & metrics for all the clusters, if you to filter based on cluster alias, do the following
330
+
1. After the deployment is complete, go to the Lambda console, and open the **mongodbatlas.yaml** file and uncomment `Clusters` parameter under `Collection` section, as shown in the following example. Add your cluster names for which you want to collect logs & metrics. Cluster name should be same as what you have specified during [cluster creation](https://www.mongodb.com/docs/atlas/tutorial/create-new-cluster/#specify-a-name-for-the-cluster-in-the-name-box).
331
+
332
+
<img src={useBaseUrl('img/integrations/databases/mongodbatlas/changecluster.png')} alt="MongoDB Atlas filter by cluster" />
333
+
334
+
1. By default the solution collects logs types and metrics which are used in the app, if you want to collect specific log types and metric types uncomment to collect the respective log type or metric name as shown below.
335
+
336
+
<img src={useBaseUrl('img/integrations/databases/mongodbatlas/updatemetricslogs.png')} alt="MongoDB Atlas filter by log and metric type" />
337
+
338
+
#### Configure Script-Based Collection for MongoDB Atlas
338
339
339
340
This section shows you how to configure script-based log collection for the Sumo Logic MongoDB Atlas app. The _sumologic-mongodb-atlas_ script is compatible with python 3.11 and python 2.7, and has been tested on Ubuntu 18.04 LTS.
340
341
@@ -365,7 +366,7 @@ This task makes the following assumptions:
365
366
```bash
366
367
pip3 install sumologic-mongodb-atlas
367
368
```
368
-
3. Create a `mongodbatlas.yaml` configuration file in the home directory and fill in the parameters as shown in the following example.
369
+
3. Create a `mongodbatlas.yaml` configuration file in the home directory by downloading the [sample file](https://github.com/SumoLogic/sumologic-mongodb-atlas/blob/master/mongodbatlas_sample.yaml) and fill in the following mandatory parameters as shown in the following example.
369
370
```bash title="mongodbatlas.yaml"
370
371
SumoLogic:
371
372
HTTP_LOGS_ENDPOINT: <Paste the HTTP Logs source URL from step 2.>
@@ -387,88 +388,24 @@ This task makes the following assumptions:
5. Configuring collection for multiple projects (assuming you are already collecting Atlas data for one project). This task requires that you do the following:
390
-
*Stop the collection of OrgEvents in the second SAM app deployment because these events are global and are already captured by first collector.
391
-
*Change the `DBNAME` so that state (keys) maintained (bookkeeping) in the database (key value store) are not in conflict.
391
+
*Create a new **mongodbatlas.yaml** file similar to previous step and comment out `EVENTS_ORG`, as shown inthe following example. This prevents the collection of `Organisation Events`in the second collector deployment, because these events are global and are already captured by first collector.
392
+
*State is maintained per project, change the `DBNAME` so that state (keysforbookkeeping) maintainedin the database (key value store) are not in conflict.
392
393
* Configure the script on a Linux machine, then go to your configuration file.
393
-
* Change the `DB_NAME` and comment out `EVENTS_ORG` as shown in the following example.
394
-
```
395
-
SumoLogic:
396
-
LOGS_SUMO_ENDPOINT: <Paste the URL for the HTTP Logs source from step 2.>
397
-
METRICS_SUMO_ENDPOINT: <Paste the URL for the HTTP Metrics source from step 2.>
398
-
399
-
MongoDBAtlas:
400
-
ORGANIZATION_ID: <Paste the Organization ID from step 1.>
401
-
PROJECT_ID: <Paste the Project ID from step 1.>
402
-
PRIVATE_API_KEY: <Paste the Private Key from step 1.>
403
-
PUBLIC_API_KEY: <Paste the Public Key from step 1.>
404
-
LOG_TYPES:
405
-
DATABASE
406
-
AUDIT
407
-
EVENTS_PROJECT
408
-
EVENTS_ORG
409
-
ALERTS
410
-
411
-
METRIC_TYPES:
412
-
PROCESS_METRICS:
413
-
CACHE_DIRTY_BYTES
414
-
CACHE_USED_BYTES
415
-
CONNECTIONS
416
-
CURSORS_TOTAL_OPEN
417
-
CURSORS_TOTAL_TIMED_OUT
418
-
DATABASE_AVERAGE_OBJECT_SIZE
419
-
DB_STORAGE_TOTAL
420
-
DB_DATA_SIZE_TOTAL
421
-
EXTRA_INFO_PAGE_FAULTS
422
-
GLOBAL_LOCK_CURRENT_QUEUE_TOTAL
423
-
MEMORY_RESIDENT
424
-
MEMORY_VIRTUAL
425
-
MEMORY_MAPPED
426
-
NETWORK_BYTES_IN
427
-
NETWORK_BYTES_OUT
428
-
NETWORK_NUM_REQUESTS
429
-
OPCOUNTER_CMD
430
-
OPCOUNTER_QUERY
431
-
OPCOUNTER_UPDATE
432
-
OPCOUNTER_DELETE
433
-
OPCOUNTER_GETMORE
434
-
OPCOUNTER_INSERT
435
-
OP_EXECUTION_TIME_READS
436
-
OP_EXECUTION_TIME_WRITES
437
-
OP_EXECUTION_TIME_COMMANDS
438
-
OPLOG_MASTER_LAG_TIME_DIFF
439
-
OPLOG_SLAVE_LAG_MASTER_TIME
440
-
QUERY_EXECUTOR_SCANNED
441
-
QUERY_EXECUTOR_SCANNED_OBJECTS
442
-
QUERY_TARGETING_SCANNED_PER_RETURNED
443
-
QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED
444
-
SYSTEM_NORMALIZED_CPU_USER
445
-
SYSTEM_NORMALIZED_CPU_KERNEL
446
-
SYSTEM_NORMALIZED_CPU_IOWAIT
447
-
PROCESS_CPU_USER
448
-
PROCESS_CPU_KERNEL
449
-
SYSTEM_NORMALIZED_CPU_STEAL
450
-
451
-
DISK_METRICS:
452
-
DISK_PARTITION_IOPS_READ
453
-
DISK_PARTITION_IOPS_WRITE
454
-
DISK_PARTITION_LATENCY_READ
455
-
DISK_PARTITION_LATENCY_WRITE
456
-
DISK_PARTITION_SPACE_PERCENT_FREE
457
-
DISK_PARTITION_SPACE_PERCENT_USED
458
-
459
-
Collection:
460
-
DBNAME: "newmongodbatlas"
461
-
MIN_REQUEST_WINDOW_LENGTH: 60
462
-
MAX_REQUEST_WINDOW_LENGTH: 900
463
-
Clusters:
464
-
- "clusters1.mongodb.net"
465
-
- "clusters2.mongodb.net"
466
-
```
394
+
395
+
6. By default the solution collects all log types & metrics for all the clusters, if you to filter based on cluster alias, do the following
396
+
1. After the deployment is complete, go to the Lambda console, and open the **mongodbatlas.yaml** file and uncomment `Clusters` parameter under `Collection` section, as shown in the following example. Add your cluster names for which you want to collect logs & metrics. Cluster name should be same as what you have specified during [cluster creation](https://www.mongodb.com/docs/atlas/tutorial/create-new-cluster/#specify-a-name-for-the-cluster-in-the-name-box).
397
+
398
+
<img src={useBaseUrl('img/integrations/databases/mongodbatlas/changecluster.png')} alt="MongoDB Atlas filter by cluster" />
399
+
400
+
1. By default the solution collects logs types and metrics which are used in the app, if you want to collect specific log types and metric types uncomment to collect the respective log type or metric name as shown below.
401
+
402
+
<img src={useBaseUrl('img/integrations/databases/mongodbatlas/updatemetricslogs.png')} alt="MongoDB Atlas filter by log and metric type" />
467
403
468
404
```sh title="Example execution of second yaml file"
**TENANT_CLUSTER_LOGS_FOR_HOST_NOT_SUPPORTED** - This means that logs are not supported for that tier.
589
+
590
+
**IP_ADDRESS_NOT_ON_ACCESS_LIST** - This means that you may also have to configure [ip access list](https://www.mongodb.com/docs/atlas/configure-api-access-org/#edit-the-api-access-list) for the host from which you want Atlas to accept API requests.
591
+
592
+
**METRIC_TYPE_UNSUPPORTED** - This means that some metric type has been deprecated, refer the logs and remove that particular metric type from mongodbatlas.yaml file.
593
+
649
594
## Installing the MongoDB Atlas app
650
595
651
596
import AppInstall from '../../reuse/apps/app-install-v2.md';
@@ -796,4 +741,4 @@ import AppUpdate from '../../reuse/apps/app-update.md';
796
741
797
742
import AppUninstall from '../../reuse/apps/app-uninstall.md';
0 commit comments