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

wavefrontHQ/wavefront-serverless-rollback-plugin-demo

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Warning

VMware has ended active development of this project. this repository will no longer be updated.

Wavefront Serverless Rollback Plugin Demo

This is a demo for the Wavefront rollback plugin.

How it works:

  • This Lambda function will send mock metric data to Wavefront
  • The plugin uses the wavefrontRollbackCondition ts query in severless.yml to determine the health of your function
  • If the alert condition is fulfilled it will trigger rollback the Lambda function
  • After rolling back, the Lambda function will delete the alert and itself

Installing and Running

From NPM

  • Switch to your own serverless service project directory
  • Run npm install -g wavefront-serverless-rollback-plugin to install plugin
  • Add wavefront-serverless-rollback-plugin to plugin list in your serverless.yml
  • Run serverless deploy to deploy your service with the rollback function

From Cloned Plugin Repo

Assuming you have cloned plugin to [path/to/wavefront-serverless-rollback-plugin]

  • Switch to cloned directory
  • Install plugin with npm install [path/to/wavefront-serverless-rollback-plugin]
  • Setup the Wavefront proxy's host and port in serverless.yml
  • Setup the Wavefront plugin options in serverless.yml, including the API key
  • Run serverless deploy
  • Test the service using the endpoint reported by serverless e.g. curl https://931s566921.execute-api.us-east-1.amazonaws.com/dev/process

Setup Wavefront Proxy

  • Install a Wavefront proxy using method described here
  • Setup the proxy to be able to collect log data as described here
  • Add grok pattern (match this to your actual metric pattern):
counters:
   - pattern: 'demoapp.%{GREEDYDATA:metricName} %{NUMBER:status} %{NUMBER:time} source=%{GREEDYDATA:funcName}'
     metricName: 'demoapp.%{metricName}'

About

Serverless plugin for doing a Lambda rollback when Wavefront alert fires. This allows you to try it out.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •