Class: Google::Apis::GkehubV1alpha::MonitoringConfig

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

Overview

This field informs Fleet-based applications/services/UIs with the necessary information for where each underlying Cluster reports its metrics.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MonitoringConfig

Returns a new instance of MonitoringConfig.



3332
3333
3334
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 3332

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

Instance Attribute Details

#clusterString

Immutable. Cluster name used to report metrics. For Anthos on VMWare/Baremetal, it would be in format memberClusters/cluster_name; And for Anthos on MultiCloud, it would be in format `azureClusters, awsClusters/cluster_name. Corresponds to the JSON propertycluster`

Returns:

  • (String)


3304
3305
3306
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 3304

def cluster
  @cluster
end

#cluster_hashString

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

Returns:

  • (String)


3312
3313
3314
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 3312

def cluster_hash
  @cluster_hash
end

#kubernetes_metrics_prefixString

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)


3320
3321
3322
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 3320

def kubernetes_metrics_prefix
  @kubernetes_metrics_prefix
end

#locationString

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

Returns:

  • (String)


3325
3326
3327
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 3325

def location
  @location
end

#project_idString

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

Returns:

  • (String)


3330
3331
3332
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 3330

def project_id
  @project_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3337
3338
3339
3340
3341
3342
3343
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 3337

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