Skip to content

MetricPipeline ​

The metricpipeline.telemetry.kyma-project.io CustomResourceDefinition (CRD) is a detailed description of the kind of data and the format used to filter and ship metric data in Kyma. To get the current CRD and show the output in the YAML format, run this command:

bash
kubectl get crd metricpipeline.telemetry.kyma-project.io -o yaml

Sample Custom Resource ​

The following MetricPipeline object defines a pipeline that integrates into an OTLP backend:

yaml
apiVersion: telemetry.kyma-project.io/v1alpha1
kind: MetricPipeline
metadata:
  name: otlp
  generation: 1
spec:
  input:
    prometheus:
      enabled: false
    istio:
      enabled: false
    runtime:
      enabled: false
  output:
    otlp:
      endpoint:
        value: https://myBackend:4317
status:
  conditions:
  - lastTransitionTime: "2024-01-09T07:02:16Z"
    message: "Metric agent DaemonSet is ready"
    observedGeneration: 1
    reason: AgentReady
    status: "True"
    type: AgentHealthy
  - lastTransitionTime: "2024-01-08T10:40:18Z"
    message: "Metric gateway Deployment is ready"
    observedGeneration: 1
    reason: GatewayReady
    status: "True"
    type: GatewayHealthy
  - lastTransitionTime: "2023-12-28T11:27:04Z"
    message: ""
    observedGeneration: 1
    reason: ConfigurationGenerated
    status: "True"
    type: ConfigurationGenerated

For further examples, see the samples directory.

Custom Resource Parameters ​

For details, see the MetricPipeline specification file.

MetricPipeline.telemetry.kyma-project.io/v1alpha1 ​

Spec:

ParameterTypeDescription
inputobjectInput configures additional inputs for metric collection.
input.​istioobjectIstio input configures collection of Istio metrics from applications running in the Istio service mesh.
input.​istio.​diagnosticMetricsobjectDiagnosticMetrics configures collection of additional diagnostic metrics. The default is false.
input.​istio.​diagnosticMetrics.​enabledbooleanIf enabled, diagnostic metrics are collected. The default is false.
input.​istio.​enabledbooleanEnabled specifies if the 'istio' input is enabled. If enabled, istio-proxy metrics are scraped from Pods that have the istio-proxy sidecar injected. The default is false.
input.​istio.​envoyMetricsobjectEnvoyMetrics enables the collection of additional Envoy metrics with prefix envoy_. The default is false.
input.​istio.​envoyMetrics.​enabledbooleanEnabled specifies that Envoy metrics with prefix envoy_ are scraped additionally. The default is false.
input.​istio.​namespacesobjectNamespaces configures the namespaces for which the collection should be activated. By default, all namespaces including system namespaces are enabled.
input.​istio.​namespaces.​exclude[]stringExclude telemetry data from the specified namespace names only. By default, all namespaces (depending on input type: except system namespaces) are collected. You cannot specify an exclude list together with an include list.
input.​istio.​namespaces.​include[]stringInclude telemetry data from the specified namespace names only. By default, all namespaces (depending on input type: except system namespaces) are included. You cannot specify an include list together with an exclude list.
input.​otlpobjectOTLP input configures the push endpoint to receive metrics from an OTLP source.
input.​otlp.​disabledbooleanDisabled specifies if the 'otlp' input is deactivated. If set to true, no push-based OTLP signals are collected. The default is false.
input.​otlp.​namespacesobjectNamespaces describes whether push-based OTLP signals from specific namespaces are selected. System namespaces are enabled by default.
input.​otlp.​namespaces.​exclude[]stringExclude telemetry data from the specified namespace names only. By default, all namespaces (depending on input type: except system namespaces) are collected. You cannot specify an exclude list together with an include list.
input.​otlp.​namespaces.​include[]stringInclude telemetry data from the specified namespace names only. By default, all namespaces (depending on input type: except system namespaces) are included. You cannot specify an include list together with an exclude list.
input.​prometheusobjectPrometheus input configures collection of application metrics in the pull-based Prometheus protocol using endpoint discovery based on annotations.
input.​prometheus.​diagnosticMetricsobjectDiagnosticMetrics configures collection of additional diagnostic metrics. The default is false.
input.​prometheus.​diagnosticMetrics.​enabledbooleanIf enabled, diagnostic metrics are collected. The default is false.
input.​prometheus.​enabledbooleanEnabled specifies if the 'prometheus' input is enabled. If enabled, Service endpoints and Pods marked with prometheus.io/scrape=true annotation are scraped. The default is false.
input.​prometheus.​namespacesobjectNamespaces specifies from which namespaces metrics are collected. By default, all namespaces except the system namespaces are enabled. To enable all namespaces including system namespaces, use an empty struct notation.
input.​prometheus.​namespaces.​exclude[]stringExclude telemetry data from the specified namespace names only. By default, all namespaces (depending on input type: except system namespaces) are collected. You cannot specify an exclude list together with an include list.
input.​prometheus.​namespaces.​include[]stringInclude telemetry data from the specified namespace names only. By default, all namespaces (depending on input type: except system namespaces) are included. You cannot specify an include list together with an exclude list.
input.​runtimeobjectRuntime input configures collection of Kubernetes runtime metrics.
input.​runtime.​enabledbooleanEnabled specifies if the 'runtime' input is enabled. If enabled, runtime metrics are collected. The default is false.
input.​runtime.​namespacesobjectNamespaces specifies from which namespaces metrics are collected. By default, all namespaces except the system namespaces are enabled. To enable all namespaces including system namespaces, use an empty struct notation.
input.​runtime.​namespaces.​exclude[]stringExclude telemetry data from the specified namespace names only. By default, all namespaces (depending on input type: except system namespaces) are collected. You cannot specify an exclude list together with an include list.
input.​runtime.​namespaces.​include[]stringInclude telemetry data from the specified namespace names only. By default, all namespaces (depending on input type: except system namespaces) are included. You cannot specify an include list together with an exclude list.
input.​runtime.​resourcesobjectResources configures the Kubernetes resource types for which metrics are collected.
input.​runtime.​resources.​containerobjectContainer configures container runtime metrics collection.
input.​runtime.​resources.​container.​enabledbooleanEnabled specifies that the runtime metrics for the resource type are collected. The default is true.
input.​runtime.​resources.​daemonsetobjectDaemonSet configures DaemonSet runtime metrics collection.
input.​runtime.​resources.​daemonset.​enabledbooleanEnabled specifies that the runtime metrics for the resource type are collected. The default is true.
input.​runtime.​resources.​deploymentobjectDeployment configures Deployment runtime metrics collection.
input.​runtime.​resources.​deployment.​enabledbooleanEnabled specifies that the runtime metrics for the resource type are collected. The default is true.
input.​runtime.​resources.​jobobjectJob configures Job runtime metrics collection.
input.​runtime.​resources.​job.​enabledbooleanEnabled specifies that the runtime metrics for the resource type are collected. The default is true.
input.​runtime.​resources.​nodeobjectNode configures Node runtime metrics collection.
input.​runtime.​resources.​node.​enabledbooleanEnabled specifies that the runtime metrics for the resource type are collected. The default is true.
input.​runtime.​resources.​podobjectPod configures Pod runtime metrics collection.
input.​runtime.​resources.​pod.​enabledbooleanEnabled specifies that the runtime metrics for the resource type are collected. The default is true.
input.​runtime.​resources.​statefulsetobjectStatefulSet configures StatefulSet runtime metrics collection.
input.​runtime.​resources.​statefulset.​enabledbooleanEnabled specifies that the runtime metrics for the resource type are collected. The default is true.
input.​runtime.​resources.​volumeobjectVolume configures Volume runtime metrics collection.
input.​runtime.​resources.​volume.​enabledbooleanEnabled specifies that the runtime metrics for the resource type are collected. The default is true.
output (required)objectOutput configures the backend to which metrics are sent. You must specify exactly one output per pipeline.
output.​otlp (required)objectOTLP output defines an output using the OpenTelemetry protocol.
output.​otlp.​authenticationobjectAuthentication defines authentication options for the OTLP output
output.​otlp.​authentication.​basicobjectBasic activates Basic authentication for the destination providing relevant Secrets.
output.​otlp.​authentication.​basic.​password (required)objectPassword contains the basic auth password or a Secret reference.
output.​otlp.​authentication.​basic.​password.​valuestringValue as plain text.
output.​otlp.​authentication.​basic.​password.​valueFromobjectValueFrom is the value as a reference to a resource.
output.​otlp.​authentication.​basic.​password.​valueFrom.​secretKeyRef (required)objectSecretKeyRef refers to the value of a specific key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
output.​otlp.​authentication.​basic.​password.​valueFrom.​secretKeyRef.​key (required)stringKey defines the name of the attribute of the Secret holding the referenced value.
output.​otlp.​authentication.​basic.​password.​valueFrom.​secretKeyRef.​name (required)stringName of the Secret containing the referenced value.
output.​otlp.​authentication.​basic.​password.​valueFrom.​secretKeyRef.​namespace (required)stringNamespace containing the Secret with the referenced value.
output.​otlp.​authentication.​basic.​user (required)objectUser contains the basic auth username or a Secret reference.
output.​otlp.​authentication.​basic.​user.​valuestringValue as plain text.
output.​otlp.​authentication.​basic.​user.​valueFromobjectValueFrom is the value as a reference to a resource.
output.​otlp.​authentication.​basic.​user.​valueFrom.​secretKeyRef (required)objectSecretKeyRef refers to the value of a specific key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
output.​otlp.​authentication.​basic.​user.​valueFrom.​secretKeyRef.​key (required)stringKey defines the name of the attribute of the Secret holding the referenced value.
output.​otlp.​authentication.​basic.​user.​valueFrom.​secretKeyRef.​name (required)stringName of the Secret containing the referenced value.
output.​otlp.​authentication.​basic.​user.​valueFrom.​secretKeyRef.​namespace (required)stringNamespace containing the Secret with the referenced value.
output.​otlp.​endpoint (required)objectEndpoint defines the host and port (<host>:<port>) of an OTLP endpoint.
output.​otlp.​endpoint.​valuestringValue as plain text.
output.​otlp.​endpoint.​valueFromobjectValueFrom is the value as a reference to a resource.
output.​otlp.​endpoint.​valueFrom.​secretKeyRef (required)objectSecretKeyRef refers to the value of a specific key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
output.​otlp.​endpoint.​valueFrom.​secretKeyRef.​key (required)stringKey defines the name of the attribute of the Secret holding the referenced value.
output.​otlp.​endpoint.​valueFrom.​secretKeyRef.​name (required)stringName of the Secret containing the referenced value.
output.​otlp.​endpoint.​valueFrom.​secretKeyRef.​namespace (required)stringNamespace containing the Secret with the referenced value.
output.​otlp.​headers[]objectHeaders defines custom headers to be added to outgoing HTTP or gRPC requests.
output.​otlp.​headers.​name (required)stringName defines the header name.
output.​otlp.​headers.​prefixstringPrefix defines an optional header value prefix. The prefix is separated from the value by a space character.
output.​otlp.​headers.​valuestringValue as plain text.
output.​otlp.​headers.​valueFromobjectValueFrom is the value as a reference to a resource.
output.​otlp.​headers.​valueFrom.​secretKeyRef (required)objectSecretKeyRef refers to the value of a specific key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
output.​otlp.​headers.​valueFrom.​secretKeyRef.​key (required)stringKey defines the name of the attribute of the Secret holding the referenced value.
output.​otlp.​headers.​valueFrom.​secretKeyRef.​name (required)stringName of the Secret containing the referenced value.
output.​otlp.​headers.​valueFrom.​secretKeyRef.​namespace (required)stringNamespace containing the Secret with the referenced value.
output.​otlp.​pathstringPath defines OTLP export URL path (only for the HTTP protocol). This value overrides auto-appended paths /v1/metrics and /v1/traces
output.​otlp.​protocolstringProtocol defines the OTLP protocol (http or grpc). Default is grpc.
output.​otlp.​tlsobjectTLS defines TLS options for the OTLP output.
output.​otlp.​tls.​caobjectDefines an optional CA certificate for server certificate verification when using TLS. The certificate must be provided in PEM format.
output.​otlp.​tls.​ca.​valuestringValue as plain text.
output.​otlp.​tls.​ca.​valueFromobjectValueFrom is the value as a reference to a resource.
output.​otlp.​tls.​ca.​valueFrom.​secretKeyRef (required)objectSecretKeyRef refers to the value of a specific key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
output.​otlp.​tls.​ca.​valueFrom.​secretKeyRef.​key (required)stringKey defines the name of the attribute of the Secret holding the referenced value.
output.​otlp.​tls.​ca.​valueFrom.​secretKeyRef.​name (required)stringName of the Secret containing the referenced value.
output.​otlp.​tls.​ca.​valueFrom.​secretKeyRef.​namespace (required)stringNamespace containing the Secret with the referenced value.
output.​otlp.​tls.​certobjectDefines a client certificate to use when using TLS. The certificate must be provided in PEM format.
output.​otlp.​tls.​cert.​valuestringValue as plain text.
output.​otlp.​tls.​cert.​valueFromobjectValueFrom is the value as a reference to a resource.
output.​otlp.​tls.​cert.​valueFrom.​secretKeyRef (required)objectSecretKeyRef refers to the value of a specific key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
output.​otlp.​tls.​cert.​valueFrom.​secretKeyRef.​key (required)stringKey defines the name of the attribute of the Secret holding the referenced value.
output.​otlp.​tls.​cert.​valueFrom.​secretKeyRef.​name (required)stringName of the Secret containing the referenced value.
output.​otlp.​tls.​cert.​valueFrom.​secretKeyRef.​namespace (required)stringNamespace containing the Secret with the referenced value.
output.​otlp.​tls.​insecurebooleanInsecure defines whether to send requests using plaintext instead of TLS.
output.​otlp.​tls.​insecureSkipVerifybooleanInsecureSkipVerify defines whether to skip server certificate verification when using TLS.
output.​otlp.​tls.​keyobjectDefines the client key to use when using TLS. The key must be provided in PEM format.
output.​otlp.​tls.​key.​valuestringValue as plain text.
output.​otlp.​tls.​key.​valueFromobjectValueFrom is the value as a reference to a resource.
output.​otlp.​tls.​key.​valueFrom.​secretKeyRef (required)objectSecretKeyRef refers to the value of a specific key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
output.​otlp.​tls.​key.​valueFrom.​secretKeyRef.​key (required)stringKey defines the name of the attribute of the Secret holding the referenced value.
output.​otlp.​tls.​key.​valueFrom.​secretKeyRef.​name (required)stringName of the Secret containing the referenced value.
output.​otlp.​tls.​key.​valueFrom.​secretKeyRef.​namespace (required)stringNamespace containing the Secret with the referenced value.

Status:

ParameterTypeDescription
conditions[]objectAn array of conditions describing the status of the pipeline.
conditions.​lastTransitionTime (required)stringlastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
conditions.​message (required)stringmessage is a human readable message indicating details about the transition. This may be an empty string.
conditions.​observedGenerationintegerobservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
conditions.​reason (required)stringreason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
conditions.​status (required)stringstatus of the condition, one of True, False, Unknown.
conditions.​type (required)stringtype of condition in CamelCase or in foo.example.com/CamelCase.

MetricPipeline Status ​

The status of the MetricPipeline is determined by the condition types GatewayHealthy, AgentHealthy, ConfigurationGenerated, and TelemetryFlowHealthy:

Condition TypeCondition StatusCondition ReasonCondition Message
GatewayHealthyTrueGatewayReadyMetric gateway Deployment is ready
GatewayHealthyTrueRolloutInProgressPods are being started/updated
GatewayHealthyFalseGatewayNotReadyNo Pods deployed
GatewayHealthyFalseGatewayNotReadyFailed to list ReplicaSets: reason
GatewayHealthyFalseGatewayNotReadyFailed to fetch ReplicaSets: reason
GatewayHealthyFalseGatewayNotReadyPod is not scheduled: reason
GatewayHealthyFalseGatewayNotReadyPod is in the pending state because container: container name is not running due to: reason. Please check the container: container name logs.
GatewayHealthyFalseGatewayNotReadyPod is in the failed state due to: reason
GatewayHealthyFalseGatewayNotReadyDeployment is not yet created
GatewayHealthyFalseGatewayNotReadyFailed to get Deployment
GatewayHealthyFalseGatewayNotReadyFailed to get latest ReplicaSets
AgentHealthyTrueAgentNotRequired
AgentHealthyTrueAgentReadyMetric agent DaemonSet is ready
AgentHealthyTrueRolloutInProgressPods are being started/updated
AgentHealthyFalseAgentNotReadyNo Pods deployed
AgentHealthyFalseAgentNotReadyDaemonSet is not yet created
AgentHealthyFalseAgentNotReadyFailed to get DaemonSet
AgentHealthyFalseAgentNotReadyPod is in the pending state because container: container name is not running due to: reason
AgentHealthyFalseAgentNotReadyPod is in the failed state due to: reason
ConfigurationGeneratedTrueAgentGatewayConfiguredMetricPipeline specification is successfully applied to the configuration of Metric gateway
ConfigurationGeneratedTrueTLSCertificateAboutToExpireTLS (CA) certificate is about to expire, configured certificate is valid until YYYY-MM-DD
ConfigurationGeneratedFalseEndpointInvalidOTLP output endpoint invalid: reason
ConfigurationGeneratedFalseMaxPipelinesExceededMaximum pipeline count limit exceeded
ConfigurationGeneratedFalseReferencedSecretMissingOne or more referenced Secrets are missing: Secret 'my-secret' of Namespace 'my-namespace'
ConfigurationGeneratedFalseReferencedSecretMissingOne or more keys in a referenced Secret are missing: Key 'my-key' in Secret 'my-secret' of Namespace 'my-namespace'"
ConfigurationGeneratedFalseReferencedSecretMissingSecret reference is missing field/s: (field1, field2, ...)
ConfigurationGeneratedFalseTLSCertificateExpiredTLS (CA) certificate expired on YYYY-MM-DD
ConfigurationGeneratedFalseTLSConfigurationInvalidTLS configuration invalid
ConfigurationGeneratedFalseValidationFailedPipeline validation failed due to an error from the Kubernetes API server
TelemetryFlowHealthyTrueFlowHealthyNo problems detected in the telemetry flow
TelemetryFlowHealthyFalseGatewayAllTelemetryDataDroppedBackend is not reachable or rejecting metrics. All metrics are dropped. See troubleshooting: No Metrics Arrive at the Backend
TelemetryFlowHealthyFalseGatewayThrottlingMetric gateway is unable to receive metrics at current rate. See troubleshooting: Gateway Throttling
TelemetryFlowHealthyFalseGatewaySomeTelemetryDataDroppedBackend is reachable, but rejecting metrics. Some metrics are dropped. See troubleshooting: Not All Metrics Arrive at the Backend
TelemetryFlowHealthyFalseConfigurationNotGeneratedNo metrics delivered to backend because MetricPipeline specification is not applied to the configuration of Metric gateway. Check the 'ConfigurationGenerated' condition for more details
TelemetryFlowHealthyUnknownGatewayProbingFailedCould not determine the health of the telemetry flow because the self monitor probing failed