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 yamlSample 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/v1alpha1kind: LogParsermetadata: name: my-regex-parserspec: 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:
| Parameter | Type | Description |
|---|---|---|
| parser | string | Fluent 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:
| Parameter | Type | Description |
|---|---|---|
| conditions | []object | An array of conditions describing the status of the parser. |
| conditions.lastTransitionTime | string | An array of conditions describing the status of the parser. |
| conditions.reason | string | An array of conditions describing the status of the parser. |
| conditions.type | string | The possible transition types are:- Running: The parser is ready and usable.- Pending: The parser is being activated. |