sbstjn / serverless-sqs-alarms-plugin

Serverless wrapper to setup CloudWatch Alarms for SQS
https://www.npmjs.com/package/serverless-sqs-alarms-plugin
MIT License
36 stars 22 forks source link

Specify Period and EvaluationPeriods #10

Closed gcphost closed 6 years ago

gcphost commented 6 years ago

Discussed in #7.

This PR enables the ability to pass an Object as a thresholds value.

This object must contain the value key.

Optional keys are: namespace, period, and evaluationPeriods.

Usage

thresholds:
  - value: 1
    period: 60
    evaluationPeriods: 5
    namespace: My/Namespace

as well as

thresholds:
  - 1
  - 2

This PR includes an additional test to ensure the parameters are correctly set. "creates CloudFormation configuration with custom thresholds"

adamclark-dev commented 6 years ago

+1 this would be great to merge in, was about to fork to be able to set threshold.

sbstjn commented 6 years ago

Thanks for the great contribution 😍 Sorry for the delay!

sbstjn commented 6 years ago

Should be on NPM as 0.1.7 in a few minutes …

sbstjn commented 6 years ago

Deployment is done, enjoy the updated version! 🎉