Cron

One-off metric values are rarely useful on their own. The real value comes when you can plot and see them over time; how they change, how fast they change, what their range is, and so on.

On Linux you can schedule a command easily with the cron command. By putting the AWS CLI commands in a script, and scheduling it with cron to run periodically, you can feed metrics consistently to CloudWatch, without the overhead of running a dedicated agent on your instances.

Get AWS Administration Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.