Google Compute Engine: How to Control Your Daily Usage of the Cloud

A couple days ago, Ken Sim, Product Manager at Google, announced a new feature that will probably make smile those of you who are hunger for analytics about their cloud infrastructure. News is, Google finally added a mean to programmatic access detailed Google Compute Engine usage data, thanks to the so-called Compute Engine Usage Export.

You can enable it from the Console as shown in this screenshot from the GCP official blog:

What it is

This new programmatic access feature Google has added will enable you to easily export detailed reports about your usage data. Usage Export makes it quite easy to obtain more insight about your usage of Compute Engine at a quite deep level. For example, you can monitor exactly how long a virtual machine has been running or how much storage space a persistent disk uses on a daily basis. Being able to access those data programmatically opens a wide range of possibilities that were precluded before. Usage Export will provide both daily reports that include usage data from the latest 24 hour period and also a monthly rollup report that include monthly usage data up to the most current day. 

How Usage Export works

Google Compute Engine Usage Export is very similar to Billing Export, the tool to get programmatic access to Billing data through the Billing API. It allows you to export a CSV file with the detailed usage data to the Google Cloud Storage bucket you want it to be saved to. Once there, the CSV file can be accessed through either the Cloud Storage API, the CLI tool, or the Console. An interesting feature here is the possibility of combining item from Usage Export with data from Billing Export. Linking elements among the two makes it easy to identify unexpected charges for a particular resource, or any other weird behavior you may incur. Thanks to that, you can monitor, analyze and optimize both the performance and the costs of your whole infrastructure.

If you want to start learning how to Google Compute Engine and the Google Cloud Platform, check the Google Cloud Platform Fundamentals Learning Path and learn how to deploy an application to App Engine, Container Engine, and Compute Engine.

Cloud Academy