Telemetry - LogParser

The logparser.telemetry.kyma-project.io CustomResourceDefinition (CRD) is a detailed description of the kind of data and the format used to define a custom log parser 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 logparser.telemetry.kyma-project.io -o yaml

Sample custom resource

The following LogParser object defines a parser which can parse a log line like: {"data":"100 0.5 true This is example"}.

Click to copy
apiVersion: telemetry.kyma-project.io/v1alpha1
kind: LogParser
metadata:
name: my-regex-parser
spec:
parser: |
Format regex
Regex ^(?<INT>[^ ]+) (?<FLOAT>[^ ]+) (?<BOOL>[^ ]+) (?<STRING>.+)$

For further LogParser examples, see the samples directory.

Custom resource parameters

spec attribute

For details, see the LogParser specification file.

ParameterTypeDescription
parserobjectFluent Bit Parsers. The parser specified here has no effect until it is referenced by a Pod annotation on your workload or by a Parser Filter defined in a pipelines filters section.
parser.contentstringThe actual parser definition in the syntax of Fluent Bit.

status attribute

For details, see the LogParser specification file.

ParameterTypeDescription
conditions[]objectAn array of conditions describing the status of the parser.
conditions[].lastTransitionTime[]objectAn array of conditions describing the status of the parser.
conditions[].reason[]objectAn array of conditions describing the status of the parser.
conditions[].typeenumThe possible transition types are:- Running: The parser is ready and usable.- Pending: The parser is being activated.