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/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
spec attribute
For details, see the LogParser specification file.
Parameter | Type | Description |
---|---|---|
parser | object | 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 pipelines filters section. |
parser.content | string | The actual parser definition in the syntax of Fluent Bit. |
status attribute
For details, see the LogParser specification file.
Parameter | Type | Description |
---|---|---|
conditions | []object | An array of conditions describing the status of the parser. |
conditions[].lastTransitionTime | []object | An array of conditions describing the status of the parser. |
conditions[].reason | []object | An array of conditions describing the status of the parser. |
conditions[].type | enum | The possible transition types are:- Running : The parser is ready and usable.- Pending : The parser is being activated. |