Reference documentation and code samples for the Google Cloud Gke Hub V1 Client class MonitoringConfig.
This field informs Fleet-based applications/services/UIs with the necessary
information for where each underlying Cluster reports its metrics.
Generated from protobuf messagegoogle.cloud.gkehub.v1.MonitoringConfig
Namespace
Google \ Cloud \ GkeHub \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ project_id
string
Immutable. Project used to report Metrics
↳ location
string
Immutable. Location used to report Metrics
↳ cluster
string
Immutable. Cluster name used to report metrics. For Anthos on VMWare/Baremetal, it would be in formatmemberClusters/cluster_name; And for Anthos on MultiCloud, it would be in format{azureClusters, awsClusters}/cluster_name.
↳ kubernetes_metrics_prefix
string
Kubernetes system metrics, if available, are written to this prefix. This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today but will migration to be under kubernetes.io/anthos
↳ cluster_hash
string
Immutable. Cluster hash, this is a unique string generated by google code, which does not contain any PII, which we can use to reference the cluster. This is expected to be created by the monitoring stack and persisted into the Cluster object as well as to GKE-Hub.
getProjectId
Immutable. Project used to report Metrics
Returns
Type
Description
string
setProjectId
Immutable. Project used to report Metrics
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getLocation
Immutable. Location used to report Metrics
Returns
Type
Description
string
setLocation
Immutable. Location used to report Metrics
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getCluster
Immutable. Cluster name used to report metrics.
For Anthos on VMWare/Baremetal, it would be in formatmemberClusters/cluster_name; And for Anthos on MultiCloud, it would be in
format{azureClusters, awsClusters}/cluster_name.
Returns
Type
Description
string
setCluster
Immutable. Cluster name used to report metrics.
For Anthos on VMWare/Baremetal, it would be in formatmemberClusters/cluster_name; And for Anthos on MultiCloud, it would be in
format{azureClusters, awsClusters}/cluster_name.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getKubernetesMetricsPrefix
Kubernetes system metrics, if available, are written to this prefix.
This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos
eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today
but will migration to be under kubernetes.io/anthos
Returns
Type
Description
string
setKubernetesMetricsPrefix
Kubernetes system metrics, if available, are written to this prefix.
This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos
eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today
but will migration to be under kubernetes.io/anthos
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getClusterHash
Immutable. Cluster hash, this is a unique string generated by google code,
which does not contain any PII, which we can use to reference the cluster.
This is expected to be created by the monitoring stack and persisted into
the Cluster object as well as to GKE-Hub.
Returns
Type
Description
string
setClusterHash
Immutable. Cluster hash, this is a unique string generated by google code,
which does not contain any PII, which we can use to reference the cluster.
This is expected to be created by the monitoring stack and persisted into
the Cluster object as well as to GKE-Hub.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Gke Hub V1 Client - Class MonitoringConfig (1.0.6)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.6 (latest)](/php/docs/reference/cloud-gke-hub/latest/V1.MonitoringConfig)\n- [1.0.5](/php/docs/reference/cloud-gke-hub/1.0.5/V1.MonitoringConfig)\n- [0.10.0](/php/docs/reference/cloud-gke-hub/0.10.0/V1.MonitoringConfig)\n- [0.9.5](/php/docs/reference/cloud-gke-hub/0.9.5/V1.MonitoringConfig)\n- [0.8.2](/php/docs/reference/cloud-gke-hub/0.8.2/V1.MonitoringConfig)\n- [0.7.1](/php/docs/reference/cloud-gke-hub/0.7.1/V1.MonitoringConfig)\n- [0.6.3](/php/docs/reference/cloud-gke-hub/0.6.3/V1.MonitoringConfig)\n- [0.5.6](/php/docs/reference/cloud-gke-hub/0.5.6/V1.MonitoringConfig) \nReference documentation and code samples for the Google Cloud Gke Hub V1 Client class MonitoringConfig.\n\nThis field informs Fleet-based applications/services/UIs with the necessary\ninformation for where each underlying Cluster reports its metrics.\n\nGenerated from protobuf message `google.cloud.gkehub.v1.MonitoringConfig`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ GkeHub \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getProjectId\n\nImmutable. Project used to report Metrics\n\n### setProjectId\n\nImmutable. Project used to report Metrics\n\n### getLocation\n\nImmutable. Location used to report Metrics\n\n### setLocation\n\nImmutable. Location used to report Metrics\n\n### getCluster\n\nImmutable. Cluster name used to report metrics.\n\nFor Anthos on VMWare/Baremetal, it would be in format\n`memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in\nformat\n`{azureClusters, awsClusters}/cluster_name`.\n\n### setCluster\n\nImmutable. Cluster name used to report metrics.\n\nFor Anthos on VMWare/Baremetal, it would be in format\n`memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in\nformat\n`{azureClusters, awsClusters}/cluster_name`.\n\n### getKubernetesMetricsPrefix\n\nKubernetes system metrics, if available, are written to this prefix.\n\nThis defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos\neventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today\nbut will migration to be under kubernetes.io/anthos\n\n### setKubernetesMetricsPrefix\n\nKubernetes system metrics, if available, are written to this prefix.\n\nThis defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos\neventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today\nbut will migration to be under kubernetes.io/anthos\n\n### getClusterHash\n\nImmutable. Cluster hash, this is a unique string generated by google code,\nwhich does not contain any PII, which we can use to reference the cluster.\n\nThis is expected to be created by the monitoring stack and persisted into\nthe Cluster object as well as to GKE-Hub.\n\n### setClusterHash\n\nImmutable. Cluster hash, this is a unique string generated by google code,\nwhich does not contain any PII, which we can use to reference the cluster.\n\nThis is expected to be created by the monitoring stack and persisted into\nthe Cluster object as well as to GKE-Hub."]]