Class MetricsConfig
- java.lang.Object
-
- io.fabric8.openshift.api.model.hive.metricsconfig.v1.MetricsConfig
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<MetricsConfigBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class MetricsConfig extends Object implements io.fabric8.kubernetes.api.builder.Editable<MetricsConfigBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MetricsConfig()No args constructor for use in serializationMetricsConfig(Map<String,String> additionalClusterDeploymentLabels, List<MetricsWithDuration> metricsWithDuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricsConfigBuilderedit()Map<String,String>getAdditionalClusterDeploymentLabels()AdditionalClusterDeploymentLabels allows configuration of additional labels to be applied to certain metrics.Map<String,Object>getAdditionalProperties()List<MetricsWithDuration>getMetricsWithDuration()Optional metrics and their configurationsvoidsetAdditionalClusterDeploymentLabels(Map<String,String> additionalClusterDeploymentLabels)AdditionalClusterDeploymentLabels allows configuration of additional labels to be applied to certain metrics.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetMetricsWithDuration(List<MetricsWithDuration> metricsWithDuration)Optional metrics and their configurationsMetricsConfigBuildertoBuilder()
-
-
-
Constructor Detail
-
MetricsConfig
public MetricsConfig()
No args constructor for use in serialization
-
MetricsConfig
public MetricsConfig(Map<String,String> additionalClusterDeploymentLabels, List<MetricsWithDuration> metricsWithDuration)
-
-
Method Detail
-
getAdditionalClusterDeploymentLabels
public Map<String,String> getAdditionalClusterDeploymentLabels()
AdditionalClusterDeploymentLabels allows configuration of additional labels to be applied to certain metrics. The keys can be any string value suitable for a metric label (see https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). The values can be any ClusterDeployment label key (from metadata.labels). When observing an affected metric, hive will label it with the specified metric key, and copy the value from the specified ClusterDeployment label. For example, including {"ocp_major_version": "hive.openshift.io/version-major"} will cause affected metrics to include a label key ocp_major_version with the value from the hive.openshift.io/version-major ClusterDeployment label -- e.g. "4". NOTE: Avoid ClusterDeployment labels whose values are unbounded, such as those representing cluster names or IDs, as these will cause your prometheus database to grow indefinitely. Affected metrics are those whose type implements the metricsWithDynamicLabels interface found in pkg/controller/metrics/metrics_with_dynamic_labels.go
-
setAdditionalClusterDeploymentLabels
public void setAdditionalClusterDeploymentLabels(Map<String,String> additionalClusterDeploymentLabels)
AdditionalClusterDeploymentLabels allows configuration of additional labels to be applied to certain metrics. The keys can be any string value suitable for a metric label (see https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). The values can be any ClusterDeployment label key (from metadata.labels). When observing an affected metric, hive will label it with the specified metric key, and copy the value from the specified ClusterDeployment label. For example, including {"ocp_major_version": "hive.openshift.io/version-major"} will cause affected metrics to include a label key ocp_major_version with the value from the hive.openshift.io/version-major ClusterDeployment label -- e.g. "4". NOTE: Avoid ClusterDeployment labels whose values are unbounded, such as those representing cluster names or IDs, as these will cause your prometheus database to grow indefinitely. Affected metrics are those whose type implements the metricsWithDynamicLabels interface found in pkg/controller/metrics/metrics_with_dynamic_labels.go
-
getMetricsWithDuration
public List<MetricsWithDuration> getMetricsWithDuration()
Optional metrics and their configurations
-
setMetricsWithDuration
public void setMetricsWithDuration(List<MetricsWithDuration> metricsWithDuration)
Optional metrics and their configurations
-
edit
public MetricsConfigBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<MetricsConfigBuilder>
-
toBuilder
public MetricsConfigBuilder toBuilder()
-
-