Class: Google::Apis::GkehubV1beta::MonitoringConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/gkehub_v1beta/classes.rb,
lib/google/apis/gkehub_v1beta/representations.rb,
lib/google/apis/gkehub_v1beta/representations.rb

Overview

MonitoringConfig informs Fleet-based applications/services/UIs how the metrics for the underlying cluster is reported to cloud monitoring services. It can be set from empty to non-empty, but can't be mutated directly to prevent accidentally breaking the constinousty of metrics.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MonitoringConfig

Returns a new instance of MonitoringConfig.



3837
3838
3839
# File 'lib/google/apis/gkehub_v1beta/classes.rb', line 3837

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#clusterString

Optional. Cluster name used to report metrics. For Anthos on VMWare/Baremetal/ MultiCloud clusters, it would be in format cluster_type/cluster_name, e.g., "awsClusters/cluster_1". Corresponds to the JSON property cluster

Returns:

  • (String)


3811
3812
3813
# File 'lib/google/apis/gkehub_v1beta/classes.rb', line 3811

def cluster
  @cluster
end

#cluster_hashString

Optional. For GKE and Multicloud clusters, this is the UUID of the cluster resource. For VMWare and Baremetal clusters, this is the kube-system UID. Corresponds to the JSON property clusterHash

Returns:

  • (String)


3817
3818
3819
# File 'lib/google/apis/gkehub_v1beta/classes.rb', line 3817

def cluster_hash
  @cluster_hash
end

#kubernetes_metrics_prefixString

Optional. 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. Corresponds to the JSON property kubernetesMetricsPrefix

Returns:

  • (String)


3825
3826
3827
# File 'lib/google/apis/gkehub_v1beta/classes.rb', line 3825

def kubernetes_metrics_prefix
  @kubernetes_metrics_prefix
end

#locationString

Optional. Location used to report Metrics Corresponds to the JSON property location

Returns:

  • (String)


3830
3831
3832
# File 'lib/google/apis/gkehub_v1beta/classes.rb', line 3830

def location
  @location
end

#project_idString

Optional. Project used to report Metrics Corresponds to the JSON property projectId

Returns:

  • (String)


3835
3836
3837
# File 'lib/google/apis/gkehub_v1beta/classes.rb', line 3835

def project_id
  @project_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3842
3843
3844
3845
3846
3847
3848
# File 'lib/google/apis/gkehub_v1beta/classes.rb', line 3842

def update!(**args)
  @cluster = args[:cluster] if args.key?(:cluster)
  @cluster_hash = args[:cluster_hash] if args.key?(:cluster_hash)
  @kubernetes_metrics_prefix = args[:kubernetes_metrics_prefix] if args.key?(:kubernetes_metrics_prefix)
  @location = args[:location] if args.key?(:location)
  @project_id = args[:project_id] if args.key?(:project_id)
end