Skip to main content

sumologic-slack

Solution to pull logs from Slack to Sumo Logic

Installation

This collector can be deployed both onprem and on cloud.

Deploying the collector on a VM

  1. Get Token from Slack for your workspace/Team.

  2. Add a Hosted Collector and one HTTP Logs Source

  3. Using the sumologic-slack collector

    • Method 1 - Configuring the sumologic-slack collector

      Below instructions assume pip is already installed if not then, see the pip docs on how to download and install pip. sumologic-slack is compatible with python 3.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 pip3 install sumologic-slack

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

        Slack:
            TOKEN: <Paste the Token collected from Slack App from step 1.>
            ENABLE_INFREQUENT_CHANNELS: < Default is false.
                                          true -> Enable dividing channels into frequent and infrequent based on the last message time.
                                          false -> Send all public channels messages.>
            INFREQUENT_CHANNELS_THRESHOLD_IN_HOURS: < Default is 72.
                                                      Threshold in hours to make channels as infrequent based on last message time. 
                                                      For eg, 12 hours means if the message is not recived for 12 hours, channel will be marked as infrequent.>
            INFREQUENT_CHANNELS_MESSAGES_FETCH_TIME_IN_HOURS: < Default is 12.
                                                                Time in hours to fetch messages for InFrequent channels.
                                                                For eg, 12 hours means send infrequent channels messages every 12 hours.>
        Collection:
            BACKFILL_DAYS: <Enter the Number of days before the event collection will start.>
            DBNAME: <New Database Name.>
        SumoLogic:
            HTTP_LOGS_ENDPOINT: <Paste the URL for the HTTP Logs source from step 2.>
        
    • 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 sumoslack.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-slack” and select the app as shown below: App

      • In the Configure application parameters panel, shown below: Deploy

        Token: Paste the Token collected from Slack App from step 1.
        HttpLogsEndpoint: Paste the URL for the HTTP Logs source from step 2.
        BackfillDays: Enter the number of days for which logs should be collected. For eg, 2 means logs for last 2 days.
        DatabaseName: DynamoDB Table Name. Use the table name to identify the Slack Workspace for which you are collecting logs. Do not use the same DataBase Name across multiple installations.
        EnableInfrequentChannels: Default is false. 
                                  true -> Enable dividing channels into frequent and infrequent based on the last message time.
                                  false -> Send all public channels messages.
        CreateSecret: Default is No.
                                  Yes -> Encrypt the Provided Environment variables HTTP_LOGS_ENDPOINT, TOKEN using KMS and Secret Manager.
                                  No -> No encryption.
        AwsKmsKeyARN: Please provide an existing KMS Key ARN to encrypt the Environment variables HTTP_LOGS_ENDPOINT, TOKEN. If kept empty, a new KMS Key ID will be created if CreateSecret is Yes.
        
      • Click Deploy.

    *** For internal read only ***

    To run use below command python -m sumoslack.main

    To build use below command sumoappclient -e -d -c

Metadata

Release files for sumologic-slack 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sumologic-slack 1.1.2
File Size Uploaded Provenance Actions
sumologic-slack-1.1.2.tar.gz 17.5 kB Without provenance Details for sumologic-slack-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sumologic-slack 1.1.2
File Interpreter ABI Platform Actions
sumologic_slack-1.1.2-py3-none-any.whl Python 3 none any Details for sumologic_slack-1.1.2-py3-none-any.whl

Total release size: 35.8 kB

Release files / sumologic-slack-1.1.2.tar.gz

Download URL sumologic-slack-1.1.2.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b13170fe44cef161cbcaf6e3a2d3220abf6cc1db16b0cb8f7b47f0fdfa87a186
BLAKE2b-256 checksum
How to use checksums
4b33a396453153d39507c167b9d02a3773ace76492d0d18771d5a7324461fdbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Release files / sumologic_slack-1.1.2-py3-none-any.whl

Download URL sumologic_slack-1.1.2-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67e008f84c16c94cc75f92256878f1a93b037fff5e0df3cf156c01c996723243
BLAKE2b-256 checksum
How to use checksums
4a627b6eb1e1aede30aef10167fbf9490ebf3474fdc752e3d74eb5df65478c52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Security for sumologic-slack 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page