Telemetry - LogPipeline

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

Click to copy
kubectl get crd logpipeline.telemetry.kyma-project.io -o yaml

Sample custom resource

The following LogPipeline object defines a pipeline integrating with the HTTP/JSON-based output using basic authentication, excluding application logs emitted by istio-proxy containers.

Click to copy
apiVersion: telemetry.kyma-project.io/v1alpha1
kind: LogPipeline
metadata:
name: custom-fluentd
spec:
input:
application:
containers:
exclude:
- istio-proxy
namespaces: {}
output:
http:
dedot: true
host:
valueFrom:
secretKeyRef:
key: Fluentd-endpoint
name: custom-fluentd
namespace: default
password:
valueFrom:
secretKeyRef:
key: Fluentd-password
name: custom-fluentd
namespace: default
tls: {}
uri: /customindex/kyma
user:
valueFrom:
secretKeyRef:
key: Fluentd-username
name: custom-fluentd
namespace: default
status:
conditions:
- lastTransitionTime: "2022-11-25T12:38:36Z"
reason: FluentBitDaemonSetRestarted
type: Pending
- lastTransitionTime: "2022-11-25T12:39:26Z"
reason: FluentBitDaemonSetRestartCompleted
type: Running

For further LogPipeline examples, see the samples directory.

Custom resource parameters

For details, see the LogPipeline specification file.

LogPipeline.telemetry.kyma-project.io/v1alpha1

Spec:

ParameterTypeDescription
files[]objectProvides file content to be consumed by a LogPipeline configuration
files.contentstring
files.namestring
filters[]objectDescribes a filtering option on the logs of the pipeline.
filters.customstringCustom filter definition in the Fluent Bit syntax. Note: If you use a custom filter, you put the LogPipeline in unsupported mode.
inputobjectDefines where to collect logs, including selector mechanisms.
input.applicationobjectConfigures in more detail from which containers application logs are enabled as input.
input.application.containersobjectDescribes whether application logs from specific containers are selected. The options are mutually exclusive.
input.application.containers.exclude[]stringSpecifies to exclude only the container logs with the specified container names.
input.application.containers.include[]stringSpecifies to include only the container logs with the specified container names.
input.application.dropLabelsbooleanDefines whether to drop all Kubernetes labels. The default is false.
input.application.keepAnnotationsbooleanDefines whether to keep all Kubernetes annotations. The default is false.
input.application.namespacesobjectDescribes whether application logs from specific Namespaces are selected. The options are mutually exclusive. System Namespaces are excluded by default from the collection.
input.application.namespaces.exclude[]stringExclude the container logs of the specified Namespace names.
input.application.namespaces.include[]stringInclude only the container logs of the specified Namespace names.
input.application.namespaces.systembooleanSet to true if collecting from all Namespaces must also include the system Namespaces like kube-system, istio-system, and kyma-system.
outputobjectFluent Bit output where you want to push the logs. Only one output can be specified.
output.customstringDefines a custom output in the Fluent Bit syntax. Note: If you use a custom output, you put the LogPipeline in unsupported mode.
output.grafana-lokiobjectConfigures an output to the Kyma-internal Loki instance. Fluent Bit grafana-loki output. Note: This output is considered legacy and is only provided for backward compatibility with the deprecated in-cluster Loki instance. It might not be compatible with the latest Loki versions. For integration with a custom Loki installation use the custom output with the name loki instead, see also Installing a custom Loki stack in Kyma.
output.grafana-loki.labelsmap[string]stringLabels to set for each log record.
output.grafana-loki.removeKeys[]stringAttributes to be removed from a log record.
output.grafana-loki.urlobjectGrafana Loki URL.
output.grafana-loki.url.valuestringValue that can contain references to Secret values.
output.grafana-loki.url.valueFromobject
output.grafana-loki.url.valueFrom.secretKeyRefobjectRefers to a key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
output.grafana-loki.url.valueFrom.secretKeyRef.keystring
output.grafana-loki.url.valueFrom.secretKeyRef.namestring
output.grafana-loki.url.valueFrom.secretKeyRef.namespacestring
output.httpobjectConfigures an HTTP-based output compatible with the Fluent Bit HTTP output plugin.
output.http.compressstringDefines the compression algorithm to use.
output.http.dedotbooleanEnables de-dotting of Kubernetes labels and annotations for compatibility with ElasticSearch based backends. Dots (.) will be replaced by underscores (_). Default is false.
output.http.formatstringData format to be used in the HTTP request body. Default is json.
output.http.hostobjectDefines the host of the HTTP receiver.
output.http.host.valuestringValue that can contain references to Secret values.
output.http.host.valueFromobject
output.http.host.valueFrom.secretKeyRefobjectRefers to a key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
output.http.host.valueFrom.secretKeyRef.keystring
output.http.host.valueFrom.secretKeyRef.namestring
output.http.host.valueFrom.secretKeyRef.namespacestring
output.http.passwordobjectDefines the basic auth password.
output.http.password.valuestringValue that can contain references to Secret values.
output.http.password.valueFromobject
output.http.password.valueFrom.secretKeyRefobjectRefers to a key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
output.http.password.valueFrom.secretKeyRef.keystring
output.http.password.valueFrom.secretKeyRef.namestring
output.http.password.valueFrom.secretKeyRef.namespacestring
output.http.portstringDefines the port of the HTTP receiver. Default is 443.
output.http.tlsobjectConfigures TLS for the HTTP target server.
output.http.tls.disabledbooleanIndicates if TLS is disabled or enabled. Default is false.
output.http.tls.skipCertificateValidationbooleanIf true, the validation of certificates is skipped. Default is false.
output.http.uristringDefines the URI of the HTTP receiver. Default is "/".
output.http.userobjectDefines the basic auth user.
output.http.user.valuestringValue that can contain references to Secret values.
output.http.user.valueFromobject
output.http.user.valueFrom.secretKeyRefobjectRefers to a key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
output.http.user.valueFrom.secretKeyRef.keystring
output.http.user.valueFrom.secretKeyRef.namestring
output.http.user.valueFrom.secretKeyRef.namespacestring
variables[]objectA list of mappings from Kubernetes Secret keys to environment variables. Mapped keys are mounted as environment variables, so that they are available as Variables in the sections.
variables.namestringName of the variable to map.
variables.valueFromobject
variables.valueFrom.secretKeyRefobjectRefers to a key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
variables.valueFrom.secretKeyRef.keystring
variables.valueFrom.secretKeyRef.namestring
variables.valueFrom.secretKeyRef.namespacestring

Status:

ParameterTypeDescription
conditions[]objectAn array of conditions describing the status of the pipeline.
conditions.lastTransitionTimestringAn array of conditions describing the status of the pipeline.
conditions.reasonstringAn array of conditions describing the status of the pipeline.
conditions.typestringThe possible transition types are:- Running: The instance is ready and usable.- Pending: The pipeline is being activated.
unsupportedModebooleanIs active when the LogPipeline uses a custom output or filter; see unsupported mode.