Socket
Book a DemoInstallSign in
Socket

@digitalmaas/serverless-plugin-sqs-alarms

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digitalmaas/serverless-plugin-sqs-alarms

Serverless plugin to facilitate setup of CloudWatch Alarms for SQS queues

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Serverless SQS CloudWatch Alarms Plugin

serverless NPM version digitalmaas NPM downloads CircleCI

A Serverless plugin that simplifies the setup of CloudWatch Alarms to monitor the visible messages in an SQS queue.

Installation

From your target serverless project, run:

$ npm install --save-dev @digitalmaas/serverless-plugin-sqs-alarms

Add the plugin to your serverless.yml:

plugins:
  - '@digitalmaas/serverless-plugin-sqs-alarms'

Configuration

Configure alarms in serverless.yml:

custom:
  sqsAlarms:
    - name: your-alarm-name           # optional, unless your queue is a reference (e.g. `Ref`)
      queue: your-sqs-queue-name
      topic: your-sns-topic-name      # references can used, e.g. `Ref`, `Fn::ImportValue`
      treatMissingData: breaching     # optional, <ignore|missing|breaching|notBreaching>
      evaluationPeriods: 1            # optional, default 1
      period: 60                      # optional, default 60
      thresholds:
        - 1
        - 50
        - value: 500
          period: 300                 # optional, overrides upper level config
          evaluationPeriods: 1        # optional, overrides upper level config
          treatMissingData: ignore    # optional, overrides upper level config

The treatMissingData setting can be a string which is applied to all alarms, or an array to configure alarms individually. Valid types are ignore, missing, breaching, notBreaching (more details in the AWS docs).

In the example above, your SNS topic would receive a message when there are more than 1, 50, and 500 visible in SQS.

More Info

License

MIT License.

This project has been forked from the original serverless-sqs-alarms-plugin and published under a different name, as the original has been abandoned.

For the complete information, please refer to the license file.

Keywords

digitalmaas

FAQs

Package last updated on 08 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts