Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Serverless plugin to deploy resources required to send cloudwatch logs to sumologic.

License

Notifications You must be signed in to change notification settings

ACloudGuru/serverless-plugin-sumologic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build codecov Codacy Badge Npm Version

📋 [DEPRECATED] Sumo Logic Logs Serverless Plugin

Warning This approach has been superceeded by the official Sumo Logic plugin and is no longer recommended. This package is no longer maintained.

This Serverless plugin deploys Cloudformation Stack with resources required to send Cloudformation Logs to Sumologic. This stack uses AWS Lambda to subscribe to your CloudWatch Log Group and POSTs the log data directly to Sumo HTTP Source.

You can read about it more here.

Installation

$ yarn add --dev serverless-plugin-sumologic

Usage

Add the following configuration to your serverless.yml.

plugins:
  - serverless-plugin-sumologic

custom:
  sumologic:
    name: sumologic-logs 
    endpointUrl: sumologic-http-endpoint
    includeLogGroupInfo: true

Run yarn sls deploy to deploy your serverless stack and sumologic stack.

OR

Run yarn sls deploy sumologic to deploy just the sumologic stack without deploying your serverless stack.

Properties

  1. name: Required (Must be unique per account if you are deploying multiple stacks)
  2. endpointUrl: Required (Sumologic HTTP endpoint)
  3. includeLogGroupInfo:: Optional

Note: Camelcase version of property name is used to prefix all stack resource logical ids and output variables.

Example Serverless Configuration

service: serverless-example
frameworkVersion: ">=3.23.0 <4.0.0"
provider:
  name: aws
  runtime: nodejs16.x
  region: us-east-1

plugins:
  - serverless-plugin-sumologic

custom:
  sumologic:
    name: sumologic-logs
    endpointUrl: sumologic-http-endpoint
    includeLogGroupInfo: true

functions:
  myfunction:
    handler: src/index.handler
    memorySize: 1536
    timeout: 30

License

Feel free to use the code, it's released using the MIT license.