Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janerikcarlsen/aws-canary-monitoring
GitHub Action to monitor an AWS Cloudwatch alarm and return with error if the alarm enters an ALARM state
https://github.com/janerikcarlsen/aws-canary-monitoring
Last synced: 8 days ago
JSON representation
GitHub Action to monitor an AWS Cloudwatch alarm and return with error if the alarm enters an ALARM state
- Host: GitHub
- URL: https://github.com/janerikcarlsen/aws-canary-monitoring
- Owner: janerikcarlsen
- License: mit
- Created: 2020-03-31T23:05:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-01T01:34:19.000Z (over 4 years ago)
- Last Synced: 2024-12-01T00:03:09.854Z (22 days ago)
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-canary-monitoring
GitHub Action for monitoring an AWS Cloudwatch alarm and erroring if the alarm enters an ALARM stateThis 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:
uses:
- name: AWS Canary Monitoring
uses: janerikcarlsen/aws-canary-monitoring@v1
with:
alarm-name: name-of-cloudwatch-alarm
- name: Your rollback step
if: failure()
uses:
```