I've been searching for details of this all day and cannot find any information. I'm using AWS and wanted to know if it is possible, with an amazon service or external, to monitor and log the EC2 compute usage of individual directories?

有帮助吗?

解决方案

No, it is not possible to allocate Amazon EC2 usage costs to a fine-grained level, such as individual directory, application or user.

Amazon EC2 is charged on an hourly basis, with the cost varying by:

  • Instance Type (CPU, RAM, chipset)
  • Operating System (eg Windows instances include an hourly charge for Windows)
  • Billing type (On-Demand, Reserved Instance, Spot)

While the AWS billing system can allocate EC2 costs based on tags (eg Department), this is only done for a whole instance on an hourly basis.

Some ideas for fine-grained allocation of costs:

  • Record usage in CloudWatch via a Custom Metric, then extract data for billing purposes
  • Store usage information in log files and send them to CloudWatch Logs, then extra data for billing purposes
  • Track usage in a file, send it to Amazon S3 and then aggregate information each billing cycle

Each of these options would require custom coding and processing.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top