Grâce à ces tableaux de bord, vous pouvez filtrer les valeurs des métriques par espace de noms, numéro de bon de commande ou numéro de poste de contrat.
Avant de commencer
Pour obtenir les autorisations nécessaires pour accéder aux tableaux de bord sur l'utilisation de la facturation et les coûts prévus, demandez à votre administrateur IAM de l'organisation de vous accorder le rôle correspondant dans l'espace de noms applicable.
Filtrer les valeurs de métriques d'espace de noms
Pour filtrer les valeurs de métriques par libellés sur les espaces de noms, exécutez la requête suivante sur la page Explorer de l'instance de surveillance :
none
sum by (label_CONVERTED_LABEL_NAME) (METRIC_NAME{} * on (cluster, namespace) \
group_left(label_CONVERTED_LABEL_NAME) \
kube_namespace_labels{label_CONVERTED_LABEL_NAME=LABEL_VALUE})
Remplacez les variables suivantes :
CONVERTED_LABEL_NAME : clé de libellé permettant de filtrer les valeurs de métrique. Remplacez tous les caractères non alphabétiques de ce libellé par le caractère de soulignement _. Par exemple, app.kubernetes.io/component devient app_kubernetes_io_component.
METRIC_NAME : nom des métriques liées à la facturation.
LABEL_VALUE : valeur du libellé permettant de filtrer les métriques.
Filtrer les valeurs de métriques de pod
Pour filtrer les valeurs de métriques par libellés sur les pods, exécutez la requête suivante sur la page Explorer de l'instance de surveillance :
none
sum by (label_CONVERTED_LABEL_NAME) (METRIC_NAME{} * on (cluster, namespace, pod) \
group_left(label_CONVERTED_LABEL_NAME) \
kube_pod_labels{label_CONVERTED_LABEL_NAME=LABEL_VALUE})
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eBilling metrics can be queried and visualized using the Billing Usage and Projected Cost dashboards.\u003c/p\u003e\n"],["\u003cp\u003eThe dashboards provide visualizations for various billing-related metrics, including \u003ccode\u003eserver_org_count\u003c/code\u003e, \u003ccode\u003ekube_namespace_resource_usage\u003c/code\u003e, and several others related to storage, backups, and AI usage.\u003c/p\u003e\n"],["\u003cp\u003eMetric values can be filtered by namespace, Task Order (TO), or Contract Line Item Number (CLIN).\u003c/p\u003e\n"],["\u003cp\u003eTo filter metric values by labels on namespaces or pods, specific queries can be used in the \u003cstrong\u003eExplore\u003c/strong\u003e page of the monitoring instance by inputting the metric name, label name, and label value.\u003c/p\u003e\n"],["\u003cp\u003eAccess to the billing usage and projected cost dashboards requires the appropriate permissions, granted by an Organization IAM admin.\u003c/p\u003e\n"]]],[],null,["# Query billing metrics\n\nTo query and visualize billing metrics, use the\n[Billing Usage](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/billing/track-resource-consumption)\nand\n[Projected Cost](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/billing/estimate-projected-costs)\ndashboards.\n\nThese dashboards provide visualizations on the following billing related\nmetrics:\n\n- `server_org_count`\n- `kube_namespace_resource_usage`\n- `pod:kube_pod_container_resource_requests:sum`\n- `metering_storage_organization_allocated_capacity_bytes`\n- `metering_storage_allocated_capacity_bytes`\n- `metering_gdcbackup_protected_pods_count`\n- `metering_gdcbackup_protected_vms_count`\n- `ai_vision_usage`\n- `ai_speech_audio_length_sum`\n- `ai_translation_usage_codepoints`\n\nThrough these dashboards, you can filter the metric values by namespace, Task\nOrder (TO), or Contract Line Item Number (CLIN).\n| **Note:** Contact your Infrastructure Operator to request the TO or CLIN necessary to filter metric values.\n\nBefore you begin\n----------------\n\nTo get the permissions you need to access the billing usage and projected cost\ndashboards, ask your Organization IAM admin to grant you the corresponding\nrole in the applicable namespace.\n\nFilter namespace metric values\n------------------------------\n\n- To filter metric values by labels on namespaces, perform the following query in the **Explore** page of the monitoring instance:\n\n`none\nsum by (label_`\u003cvar translate=\"no\"\u003eCONVERTED_LABEL_NAME\u003c/var\u003e`) (`\u003cvar translate=\"no\"\u003eMETRIC_NAME\u003c/var\u003e`{} * on (cluster, namespace) \\\ngroup_left(label_`\u003cvar translate=\"no\"\u003eCONVERTED_LABEL_NAME\u003c/var\u003e`) \\\nkube_namespace_labels{label_`\u003cvar translate=\"no\"\u003eCONVERTED_LABEL_NAME\u003c/var\u003e`=`\u003cvar translate=\"no\"\u003eLABEL_VALUE\u003c/var\u003e`})`\n\n\u003cbr /\u003e\n\nReplace the following variables:\n\n- \u003cvar translate=\"no\"\u003eCONVERTED_LABEL_NAME\u003c/var\u003e: the label key to filter metric values. Replace all non-alphabetic characters in this label with the underscore `_`. For example: `app.kubernetes.io/component` becomes `app_kubernetes_io_component`.\n- \u003cvar translate=\"no\"\u003eMETRIC_NAME\u003c/var\u003e: the name of the billing-related metrics.\n- \u003cvar translate=\"no\"\u003eLABEL_VALUE\u003c/var\u003e: the label value to filter metrics.\n\nFilter pod metric values\n------------------------\n\n- To filter metric values by labels on pods, perform the following query in the **Explore** page of the monitoring instance:\n\n`none\nsum by (label_`\u003cvar translate=\"no\"\u003eCONVERTED_LABEL_NAME\u003c/var\u003e`) (`\u003cvar translate=\"no\"\u003eMETRIC_NAME\u003c/var\u003e`{} * on (cluster, namespace, pod) \\\ngroup_left(label_`\u003cvar translate=\"no\"\u003eCONVERTED_LABEL_NAME\u003c/var\u003e`) \\\nkube_pod_labels{label_`\u003cvar translate=\"no\"\u003eCONVERTED_LABEL_NAME\u003c/var\u003e`=`\u003cvar translate=\"no\"\u003eLABEL_VALUE\u003c/var\u003e`})`"]]