Billing export

888 views
Skip to first unread message

Matt Stevenson

unread,
Aug 26, 2016, 10:23:33 AM8/26/16
to gce-discussion
Hi

Is it possible to set a project billing export to a folder created within a bucket as there appears to be an ever growing list or CSV files?

How is it best to manage this setting as I was unable to use a folder after the Bucket name in Billing Export ?

Kind Regards

Matt 

Kamran (Google Cloud Support)

unread,
Aug 26, 2016, 6:25:27 PM8/26/16
to gce-discussion

Hello Matt,

As described in this article, you can enable Billing export feature to export billing data to a Google Cloud Storage bucket. At the moment specifying a folder (subdirectory) inside a bucket as the export destination is not possible. That being said, I opened a request for this feature on Google public issue tracker and will forward it to our engineering team. Please feel free to star the thread in order to receive updates about it once they are available.

Sincerely,

Kamran (Google Cloud Support)

unread,
Aug 26, 2016, 10:28:46 PM8/26/16
to gce-discussion
Hi Matt,

I want to mention that as workaround you can use gsutil cp or gsutil mv commands to copy or move the data from a bucket to another bucket or folder. This way you can archive or organize the exported files.

I hope this helps.

Sincerely



On Friday, August 26, 2016 at 10:23:33 AM UTC-4, Matt Stevenson wrote:

Kamran (Google Cloud Support)

unread,
Aug 31, 2016, 6:29:04 PM8/31/16
to gce-dis...@googlegroups.com
Hello Matt,

I received a feedback from our engineering team that this feature is available. The folder (object) name can be added in the Report prefix field. Please see the following screenshot for an example.



I hope this helps.

Sincerely,

Matt Stevenson

unread,
Sep 1, 2016, 7:41:30 AM9/1/16
to gce-discussion
Hi Karman 

Thanks I looked at this today and was able to move the files with this command. 

gsutil mv gs://mybucket/*.csv gs://mybucket/billing

If I may ask you another billing question which item in the CSV file is the charge for my storage bucket ?

Kind Regards

Matt

Mark Leonard Reynolds

unread,
Sep 1, 2016, 8:22:12 AM9/1/16
to gce-discussion

Anything with a measurement description starting with com.google.cloud/services/cloud-storage/
mark

Matt Stevenson

unread,
Sep 2, 2016, 7:51:10 AM9/2/16
to gce-discussion
Thanks Mark 

I'd like to know how much data we have total in the bucket and if we are being per GB, these are the only storage items I can see in the CSV.

com.google.cloud/services/cloud-storage/BandwidthDownloadAmerica
com.google.cloud/services/cloud-storage/ClassARequest
com.google.cloud/services/cloud-storage/StorageStandardEuGbsec

Thanks Karman

Unfortunately I tried adding foldername/reportprefix and its still saving to the root, can you help with syntax ?

Matt Stevenson

unread,
Sep 2, 2016, 7:55:18 AM9/2/16
to gce-discussion
I think this works in the console to total the size of data in a bucket. 

gsutil du -s gs://bucket

Mark Leonard Reynolds

unread,
Sep 2, 2016, 6:20:43 PM9/2/16
to gce-discussion
My motto is that "on Google Cloud Platform, you pay for everything."

The charges might be so small, they are hard to see however. For example, looking at the google storage pricing page,
the most storing a 2 gig file will cost, is 2.6 cents per gig, so 5.2 cents. Choose the cheapest option, and it becomes 2 cents.

Yup, th "gsutil du -s gs://bucket" works a treat for me too!

mark

Mark Leonard Reynolds

unread,
Sep 2, 2016, 6:22:06 PM9/2/16
to gce-discussion
> Unfortunately I tried adding foldername/reportprefix and its still saving to the root, can you help with syntax ?

I doubt the export facility has the ability to create or make the folder name (directory)
Try making it first in the web console.
mark

Kamran (Google Cloud Support)

unread,
Sep 3, 2016, 2:11:05 PM9/3/16
to gce-discussion
Hello Matt,

The syntax that I provided in the screenshot of my last post is good. I've tested it and it's working. And yes, as Mark said the folder has to be an existing object.

Please let me know if you have further questions about this feature.

Sincerely,
Reply all
Reply to author
Forward
0 new messages