buildkite / elastic-ci-stack-for-aws

An auto-scaling cluster of build agents running in your own AWS VPC
https://buildkite.com/docs/quickstart/elastic-ci-stack-aws
MIT License
418 stars 272 forks source link

Custom metric for agent's free memory #592

Open jeznag opened 5 years ago

jeznag commented 5 years ago

Would be useful to expose free memory as per https://github.com/buildkite/agent/issues/133

The concern there seemed to be that the buildkite agent should be platform independent. The Elastic CI stack is not platform independent and therefore would be great to provide free RAM metrics via cloudwatch.

I'm currently trying to understand whether my build jobs are CPU constrained or memory constrained and therefore access to RAM stats would be useful.

lox commented 5 years ago

Would something like https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html on the instances help?

jeznag commented 5 years ago

That would be ideal.

lox commented 5 years ago

If you felt inclined to submit a PR, we'd be very receptive!

keithduncan commented 3 years ago

While looking into something else I found the CloudWatch Agent can be configured to report metrics including memory. In the meantime this configuration could be added using the BootstrapScriptUrl and the agent reloaded/restarted to pick up the change.