Coder Social home page Coder Social logo

c33t33 / aws-canary-monitoring Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cee-tee/aws-canary-monitoring

1.0 0.0 1.0 11 KB

GitHub Action to monitor an AWS Cloudwatch alarm and return with error if the alarm enters an ALARM state

License: MIT License

Shell 2.33% Python 80.06% Dockerfile 17.61%

aws-canary-monitoring's Introduction

aws-canary-monitoring

GitHub Action for monitoring an AWS Cloudwatch alarm and erroring if the alarm enters an ALARM state

This GitHub Action lets you monitor a Canary by polling the state of a Cloudwatch alarm. Canaries can be set up using the Cloudwatch Synthetics feature that is currently in preview. Read more about Cloudwatch Synthetics here: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries.html

This action is intended to be run following a deployment.

If the specified CloudWatch alarm enters an ALARM state during the provided monitoring time, the action will return with an exit code 1. You can then use the failure() conditional in the following step to perform a rollback or compensating action.

The action assumes that AWS credentials is configured and available in environment variables by a previous step in the workflow.

Example Usage

The action can be used like this:

  - name: AWS Canary Monitoring
    uses: janerikcarlsen/aws-canary-monitoring@v1
    with:
      alarm-name: name-of-cloudwatch-alarm

You can specify a custom monitoring time in minutes (default 5 minutes), and a polling interval in seconds (default 10 seconds):

  - name: AWS Canary Monitoring
    uses: janerikcarlsen/aws-canary-monitoring@v1
    with:
      alarm-name: name-of-cloudwatch-alarm
      monitoring-time: 5
      polling-interval: 15

In a workflow, you can use the action typically after a deployment to conditionally trigger a rollback step or other compensating action:

steps:
  - name: <Your deployment step>
    uses: <Your deployment action>
  - name: AWS Canary Monitoring
    uses: janerikcarlsen/aws-canary-monitoring@v1
    with:
      alarm-name: name-of-cloudwatch-alarm
  - name: Your rollback step
    if: failure()
    uses: <Your rollback action>

aws-canary-monitoring's People

Contributors

janerikcarlsen avatar

Stargazers

 avatar

Forkers

c33t33

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.