Cost of Programmatic Access to MQL in Google Cloud

Viewed 46

I would like to create MQL queries through Cloud Monitoring API in Google Cloud and analyze let's say 1Million datapoints per month. I can not find any data on how much this will cost me except the $0.01 per 1,000 API calls. What is the way to calculate how many API's I will need to analyze this 1M datapoints? Your help will be appreciated. Thanks in advance

2 Answers

The documentation for the API you'll be using is here:

https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/query

There's a pageSize parameter that governs how many TimeSeriesData objects to return. The API can take a long time or time out if you request too many in a single call, so the actual number of calls needed to retrieve a given number of data points can vary.

My suggestion would be to do some testing to see how many data points a single API call will return within an acceptable amount of time and use that to determine how many total calls you'll need.

I recommend doing your analysis in an MQL query if possible. The evaluation will be efficient, and you will bypass this issue altogether.

Related