Serverless Plugin Sumologic

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.

user  

ACloudGuru

Build codecov Codacy Badge Npm Version

📋 Serverless Plugin Alert

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: ">=1.11.0 <2.0.0"
provider:
  name: aws
  runtime: nodejs12.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.

view on Github

Latest commit b2f54ec on Sep 24, 2017

New to serverless?

To get started, pop open your terminal & run:

npm install serverless -g