了解GCP Dataproc帐单以及标签如何影响帐单 [英] Understanding GCP Dataproc billing and how it is affected by labels

查看:157
本文介绍了了解GCP Dataproc帐单以及标签如何影响帐单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图确保我清楚了解我的组织如何为Google Cloud Platform Dataproc计费.

I'm trying to make sure I have a clear understanding of how my organisation gets billed for Google Cloud Platform Dataproc.

我们已将结算历史记录导出到BigQuery,以便我们对其进行分析.今天早上,我们运行了两个dataproc集群,下面的屏幕快照显示了这两个集群的计费历史记录的子集.我已经过滤了labels.key = "goog-dataproc-cluster-uuid" or labels.key = "goog-dataproc-cluster-name" or labels.key = "goog-dataproc-location".这是结果的一部分

We have exported our billing history to BigQuery so that we can analyse it. This morning we had two dataproc clusters running and the screenshot below shows a subset of the billing history for those two clusters. I have filtered on labels.key = "goog-dataproc-cluster-uuid" or labels.key = "goog-dataproc-cluster-name" or labels.key = "goog-dataproc-location". Here is a subset of the results

我已在两种sku的成本周围绘制了方框.让我们看一下在EMEA中运行的标准Intel N1 16 VCPU 项目.

I've drawn boxes around the costs for two kinds of sku. Lets's take a look at the Standard Intel N1 16 VCPU running in EMEA items.

我只有两个集群,但是对于这两个集群中的每一个,都有三行.原因是有三个标签应用于每个dataproc群集,因此成本 1.271852 & 3.815556 每次出现3次.

I only have two clusters yet for each of those two clusters there are three lines. The reason is that there are three labels applied to each dataproc cluster, hence the costs 1.271852 & 3.815556 appear three times each.

那么我的简单问题是...如何获得我的dataproc集群的总成本?是我将所有这些数字加起来(这意味着总成本在所有标签上平均分配了)还是只取其中一个值(意味着每个标签重复了成本)?

My simple question then is...how do I get the total cost of my dataproc clusters? Do I add up all of these numbers (thus implying that the total cost is split equally over all of the labels) or do I take just one of the values (implying that the cost is repeated for each label)?

这是解决我的问题的另一种方式.此查询是否给出了一天内运行集群data-dev-dataplatform-dataproc的总成本:

Here's another way of phrasing my question. Does this query give the total cost of running cluster data-dev-dataplatform-dataproc for one day:

SELECT  sum(cost)
FROM [dh-billing-179310:billing.gcp_billing_export_XXXXXXXX] 
WHERE labels.key = "goog-dataproc-cluster-name"
  and labels.value = "data-dev-dataplatform-dataproc" 
  and usage_start_time >= "2018-07-05 00:00:00"
  and usage_end_time <= "2018-07-06 00:00:00"

还是我需要包括其他标签才能获得总费用?

or do I need to include other labels in order to get the total cost?

推荐答案

在帐单导出数据的展平视图中,每个标签的成本都重复一次;您应该为任何特定的计算选择一个标签值.如果您要计算Dataproc总数,使用使用Dataproc插入的"goog-dataproc- *"标签之一可能是最方便的.

In that flattened view of billing export data, the cost is repeated for each label; you should pick a single label value for any particular calculation. If you're trying to calculate the Dataproc total, it's probably most convenient to use one of the Dataproc-inserted "goog-dataproc-*" labels.

这里的想法是,您可以使用不同的标签集来轻松组织归因于任何给定子项目的与Dataproc相关的总费用,从而可以按不同维度过滤计费查询.

The idea here is that you can use different sets of labels to easily organize your total Dataproc-related costs attributed to any given subproject, so that you can then filter your billing queries along different dimensions.

这篇关于了解GCP Dataproc帐单以及标签如何影响帐单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆