Skip to content

Commit

Permalink
update alarm and metric filter info
Browse files Browse the repository at this point in the history
  • Loading branch information
solderq35 committed Sep 1, 2023
1 parent 4e687f2 commit 1be18cf
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions website/docs/cloudwatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@ description: Overview of Cloudwatch and SNS Email Alerts

:::

- Important on left sidebar of AWS Cloudwatch:
- Logs > Log groups > `/ecs/collect-check-acq` and `/ecs/collect-sec-data`
- Alarms > All alarms > `TimeoutError` and `3Or4DaysOutage`
## Metric Filter

- Go to Cloudwatch > Log Groups > Log Group you want to add Metric Filter for > Metric Filters > Create New Metric Filter
- Follow existing filters here as an example if in doubt

## Alarm

- Cloudwatch > Alarms > Create a New Alarm
- Follow existing alarms here as an example if in doubt
- NOTE: When creating a new alarm, the metric filter will only be detected if the filter was applied to "new data" (so to speak) since the filter was created
- The CRON jobs are set up in AWS ECS are set to 24 or 48 hour intervals by default, so you may want to temporarily set the Scheduled Task in ECS to be 5 minutes to speed up development
- See [this page for more info on ECS Scheduled Tasks](webscraper_tutorial#clusters)
- Remember to set the Scheduled Task back to original time interval once you've set the alarm up and verified it works
- Note that the Scheduled Task's "cycle" is based on when you last updated it. If you last updated the Scheduled Task to run every 24 hours at 2 AM, it will run at 2 AM every day. So, it may better to set the alarm during the daytime so you don't get emailed at weird times
- The amount of time it takes for an alarm to go from "In alarm" to "Insufficient data" is defined by what you have set the "period" of the alarm as. In general, it takes 3 periods for the alarm state to reset
- This is important because if you set the "period" too high, the alarm will never reset itself and will stay in the alarmed state permanently
- Since the two jobs tracked by Cloudwatch (solar meter uploads vs regular meter uploads) are only run every 24 and 48 hours respectively, it is usually safe to leave the alarm period as 1 hour
Expand Down

0 comments on commit 1be18cf

Please sign in to comment.