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.

ParameterDescription
spec.filesProvides file content to be consumed by a LogPipeline configuration
spec.files.content
spec.files.name
spec.filtersDescribes a filtering option on the logs of the pipeline.
spec.filters.customCustom filter definition in the Fluent Bit syntax. Note: If you use a custom filter, you put the LogPipeline in unsupported mode.
spec.inputDefines where to collect logs, including selector mechanisms.
spec.input.applicationConfigures in more detail from which containers application logs are enabled as input.
spec.input.application.containersDescribes whether application logs from specific containers are selected. The options are mutually exclusive.
spec.input.application.containers.excludeSpecifies to exclude only the container logs with the specified container names.
spec.input.application.containers.includeSpecifies to include only the container logs with the specified container names.
spec.input.application.dropLabelsDefines whether to drop all Kubernetes labels. The default is false.
spec.input.application.keepAnnotationsDefines whether to keep all Kubernetes annotations. The default is false.
spec.input.application.namespacesDescribes whether application logs from specific Namespaces are selected. The options are mutually exclusive. System Namespaces are excluded by default from the collection.
spec.input.application.namespaces.excludeExclude the container logs of the specified Namespace names.
spec.input.application.namespaces.includeInclude only the container logs of the specified Namespace names.
spec.input.application.namespaces.systemSet to true if collecting from all Namespaces must also include the system Namespaces like kube-system, istio-system, and kyma-system.
spec.outputFluent Bit output where you want to push the logs. Only one output can be specified.
spec.output.customDefines a custom output in the Fluent Bit syntax. Note: If you use a custom output, you put the LogPipeline in unsupported mode.
spec.output.grafana-lokiConfigures 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.
spec.output.grafana-loki.labelsLabels to set for each log record.
spec.output.grafana-loki.removeKeysAttributes to be removed from a log record.
spec.output.grafana-loki.urlGrafana Loki URL.
spec.output.grafana-loki.url.valueValue that can contain references to Secret values.
spec.output.grafana-loki.url.valueFrom
spec.output.grafana-loki.url.valueFrom.secretKeyRefRefers to a key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
spec.output.grafana-loki.url.valueFrom.secretKeyRef.key
spec.output.grafana-loki.url.valueFrom.secretKeyRef.name
spec.output.grafana-loki.url.valueFrom.secretKeyRef.namespace
spec.output.httpConfigures an HTTP-based output compatible with the Fluent Bit HTTP output plugin.
spec.output.http.compressDefines the compression algorithm to use.
spec.output.http.dedotEnables de-dotting of Kubernetes labels and annotations for compatibility with ElasticSearch based backends. Dots (.) will be replaced by underscores (_). Default is false.
spec.output.http.formatData format to be used in the HTTP request body. Default is json.
spec.output.http.hostDefines the host of the HTTP receiver.
spec.output.http.host.valueValue that can contain references to Secret values.
spec.output.http.host.valueFrom
spec.output.http.host.valueFrom.secretKeyRefRefers to a key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
spec.output.http.host.valueFrom.secretKeyRef.key
spec.output.http.host.valueFrom.secretKeyRef.name
spec.output.http.host.valueFrom.secretKeyRef.namespace
spec.output.http.passwordDefines the basic auth password.
spec.output.http.password.valueValue that can contain references to Secret values.
spec.output.http.password.valueFrom
spec.output.http.password.valueFrom.secretKeyRefRefers to a key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
spec.output.http.password.valueFrom.secretKeyRef.key
spec.output.http.password.valueFrom.secretKeyRef.name
spec.output.http.password.valueFrom.secretKeyRef.namespace
spec.output.http.portDefines the port of the HTTP receiver. Default is 443.
spec.output.http.tlsConfigures TLS for the HTTP target server.
spec.output.http.tls.disabledIndicates if TLS is disabled or enabled. Default is false.
spec.output.http.tls.skipCertificateValidationIf true, the validation of certificates is skipped. Default is false.
spec.output.http.uriDefines the URI of the HTTP receiver. Default is "/".
spec.output.http.userDefines the basic auth user.
spec.output.http.user.valueValue that can contain references to Secret values.
spec.output.http.user.valueFrom
spec.output.http.user.valueFrom.secretKeyRefRefers to a key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
spec.output.http.user.valueFrom.secretKeyRef.key
spec.output.http.user.valueFrom.secretKeyRef.name
spec.output.http.user.valueFrom.secretKeyRef.namespace
spec.variablesA 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.
spec.variables.nameName of the variable to map.
spec.variables.valueFrom
spec.variables.valueFrom.secretKeyRefRefers to a key in a Secret. You must provide name and namespace of the Secret, as well as the name of the key.
spec.variables.valueFrom.secretKeyRef.key
spec.variables.valueFrom.secretKeyRef.name
spec.variables.valueFrom.secretKeyRef.namespace
status.conditionsAn array of conditions describing the status of the pipeline.
status.conditions.lastTransitionTimeAn array of conditions describing the status of the pipeline.
status.conditions.reasonAn array of conditions describing the status of the pipeline.
status.conditions.typeThe possible transition types are:- Running: The instance is ready and usable.- Pending: The pipeline is being activated.
status.unsupportedModeIs active when the LogPipeline uses a custom output or filter; see unsupported mode.