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

For details, see the LogParser specification file.

LogParser.telemetry.kyma-project.io/v1alpha1

Spec:

ParameterTypeDescription
parserstringFluent 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 pipeline's filters section.

Status:

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