Read logs from CLI command costs

21 views
Skip to first unread message

Daniele Paviani

unread,
May 7, 2021, 12:26:14 PM5/7/21
to Google Cloud Developers
I don't know if this is the right group for the question I have, but I didn't find a more specific one.

If I use the CLI command "gcloud logging read..." in order to download logs on a server outside of the Google Cloud Platform, will I be charged of some costs? And, if yes, where can I find how much is the price of this operation?

Alexis (Google Cloud Support)

unread,
May 10, 2021, 3:27:29 PM5/10/21
to Google Cloud Developers

Hi,

According to this[1] article, the chart shows that Cloud Logging only charges for ingestion. This applies to both the Console and SDK. There is a free tier. In your case you are doing a "read", which does not count as an ingestion as stated here[2]: " ingestion refers to the process of writing data to the Cloud Logging API and routing it to log buckets "

However, your question is tricky because in order to be reading them, they must have been already been ingested/stored somewhere. If it is in the _Required log bucket[2], storage is free[3] and doesn't count towards the monthly ingestion allotment. Otherwise, you would be charged, but not as part of the read.

In short, as long as you are not writing data and routing to a different bucket, you should be fine. This[4] clean-up process even alludes to that. However, FYI listing/reading logs has a rate limit of 1 per second[5].

Hope this helps.

Alexis
Google Cloud Platform Support

Reply all
Reply to author
Forward
0 new messages