Skip to main content

Sumo Logic collection solution for mongodb atlas

Project description

sumologic-mongodb-atlas

Solution to pull alerts from Mongo DB Atlas to Sumo Logic

Installation

This collector can be deployed both onprem and on cloud.

Deploying the collector on a VM

  1. Get Authentication information from the MongoDB Atlas portal

    • Generate Programmatic API Keys with Project owner permissions using the instructions in the Atlas docs. Copy the Public Key and Private Key. These serve the same function as a username and API Key respectively. Note: If you want to use the AWS Lambda function for collection, do not Select Add Whitelist Entry.

    • Go to your project and then click on settings. Copy the project ID as shown below:

    • Go to your organization by using context drop down at the top. Then click on settings and copy the organization ID.

  2. Add a Hosted Collector and one HTTP Logs and Metrics Source

    • To create a new Sumo Logic Hosted Collector, perform the steps in Configure a Hosted Collector.
    • Add an HTTP Logs and Metrics Source. Under Advanced you'll see options regarding timestamps and time zones and when you select Timestamp parsing specify the custom time stamp format as shown below:
      • Format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
      • Timestamp locator: \"created\": (.*),.
    • Add another HTTP Source this time for metric
  3. Method 1 - Configuring the sumologic-mongodbatlas collector

    Below instructions assume pip is already installed if not then, see the pip docs on how to download and install pip. sumologic-mongodbatlas is compatible with python 3.7 and python 2.7. It has been tested on Ubuntu 18.04 LTS and Debian 4.9.130. Login to a Linux machine and download and follow the below steps:

    • Install the collector using below command pip install sumologic-mongodbatlas

    • Create a configuration file named mongodbatlas.yaml in home directory by copying the below snippet.

        SumoLogic:
         HTTP_LOGS_ENDPOINT: <Paste the URL for the HTTP Logs source from step 2.>
         HTTP_METRICS_ENDPOINT: <Paste the URL for the HTTP Metrics source from step 2.>
    
        MongoDBAtlas:
         ORGANIZATION_ID: Paste the Organization ID from step 1.
         PROJECT_ID: Paste the Project ID from step 1.
         PRIVATE_API_KEY: Paste the Private Key from step 1.
         PUBLIC_API_KEY: Paste the Public Key from step 1.
    
    • Create a cron job for running the collector every 5 minutes by using the crontab -e and adding the below line

      */5 * * * * /usr/bin/python -m sumomongodbatlascollector.main > /dev/null 2>&1

    Method 2 - Collection via an AWS Lambda function To install Sumo Logic’s AWS Lambda script, follow the instructions below:

    • Go to https://serverlessrepo.aws.amazon.com/applications Search for “sumologic-mongodb-atlas” and select the app as shown below:

    • When the page for the Sumo app appears as shown below, click the Deploy button as shown below:

    • In the Configure application parameters panel, shown below:

      • HTTPLogsEndpoint: Paste the URL for the HTTP Logs source from step 2.
      • HTTPMetricsEndpoint: Paste the URL for the HTTP Metrics source from step 2.
      • OrganizationID: Paste the Organization ID from step 1.
      • ProjectID: Paste the Project ID from step 1.
      • Private API Key: Paste the Private Key from step 1.
      • Public API Key: Paste the Public Key from step 1.
    • Click Deploy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sumologic-mongodb-atlas-1.0.4.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

sumologic_mongodb_atlas-1.0.4-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file sumologic-mongodb-atlas-1.0.4.tar.gz.

File metadata

  • Download URL: sumologic-mongodb-atlas-1.0.4.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

File hashes

Hashes for sumologic-mongodb-atlas-1.0.4.tar.gz
Algorithm Hash digest
SHA256 09a4c35a93b4b8a562374141f0427afdb7c1be2ee0eecdec13e79ed55a3c27b1
MD5 0574ebd4d5e1ca8086726197ea462ab1
BLAKE2b-256 73d5c0b63c00b966ab2e0f30a5e411c58a15c0add3170f28c05b1c11eab08805

See more details on using hashes here.

File details

Details for the file sumologic_mongodb_atlas-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: sumologic_mongodb_atlas-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

File hashes

Hashes for sumologic_mongodb_atlas-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6de95adea5c4144db1d0ad2b9a657e8eba382f24ece4801d916e7fe4297f7f8a
MD5 04d26a0622c0f5296c8bcb8a4a329eb5
BLAKE2b-256 f847234158670601dfdc88cdb5921c58e9c2173b9d46252679c1df976542c2e5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page