Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Deprecated Method for Collecting CloudWatch Metrics #54367

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

Hamms
Copy link
Contributor

@Hamms Hamms commented Oct 19, 2023

The CloudWatch monitoring scripts are deprecated in favor of the CloudWatch agent, which we started using with #32110

Links

Follow-up work

We may still have dashboards that are referencing the old System/Linux/MemoryUtilization metrics; those should be updated to use CWAgent/mem_used_percent

The CloudWatch monitoring scripts are deprecated in favor of the CloudWatch agent, which we started using with #32110

- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-scripts-intro.html
@Hamms Hamms marked this pull request as ready for review October 24, 2023 17:28
@Hamms Hamms requested a review from a team as a code owner October 24, 2023 17:28
@sureshc
Copy link
Contributor

sureshc commented Oct 24, 2023

I’ve updated the CloudWatch Overview Dashboard app server Memory Utilization widget to use the newer Metric.
image

@sureshc
Copy link
Contributor

sureshc commented Oct 24, 2023

Looks like we need to update the CloudWatch Alarm to reference the new Metric Namespace and Name here https://github.com/code-dot-org/code-dot-org/blob/4f457167cdd18d84306452a87af0ba084fe43fdc/aws/cloudformation/components/alarms.yml.erb#L29C1-L30

@Hamms
Copy link
Contributor Author

Hamms commented Oct 24, 2023

Great, thank you!

Looks like there's also a reference in

memory_utilization = cloudwatch_resource.metric('System/Linux', 'MemoryUtilization').get_statistics(
; I'll update both of 'em, even though I'm pretty sure this one isn't used any more

…ics to instead reference CloudWatch-Agent-collected metrics
@Hamms Hamms requested a review from sureshc October 24, 2023 21:05
MetricName: MemoryUtilization
Namespace: 'System/Linux'
MetricName: mem_used_percent
Namespace: CWAgent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to change the TreatMissingData property below to breaching so that we act on missing data with more urgency https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-alarm.html#cfn-cloudwatch-alarm-treatmissingdata

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems reasonable; I'll do so in a follow-up PR, though, since that's unrelated to the metrics switch in this PR

@Hamms Hamms merged commit d96d5c2 into staging Oct 25, 2023
2 checks passed
@Hamms Hamms deleted the remove-deprecated-cloudwatch-metric-collection branch October 25, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants