Logs Pipeline Examples
Last updated
Last updated
We strongly advise reading the in order to fully understand the functionalities of writing pipelines steps.
The following example attempts to match the contents of a log line with a given regex pattern, extracting named groups if successful. We recommend using named groups in the regex pattern for best experience, automatically creating named attributes which will appear in the system.
For example, this transform will create new timestamp
and pid
fields if they are successfully extracted from the content.
Note that we are only performing the parsing if the format
attribute equals "unknown" - otherwise it means groundcover has already parsed the log format and extracted the fields beforehand.
The custom-format
value is up to you, and will appear in the UI under the format
filter.
The following example attempts to rename an attribute called oldName
to newName
.
If it does not exists, no changes are made.