Cribl LogStream ships with a Regex Library that contains a set of pre-built common regex patterns. This library serves as an easily accessible repository of regular expressions. The Library is searchable, and you can assign tags to each pattern for further organization or categorization. The Library is located under Knowledge > Regex Library .
As of this version, the Library contains 25 patterns shipped by Cribl LogStream. To insert a pattern into a Function's regex field, first click the pop-out or Edit icon beside that field.
In the resulting Regex or Rules modal, Regex Library patterns will appear as typeahead options. Click a pattern to paste it in. You can then use the pattern as-is, or modify it as necessary.
You can also add new, custom patterns to the Library. In the same modal, once you've built your pattern, click the Save to Library button.
In the resulting modal, give your custom pattern a unique ID. Optionally, you can also provide a Description (name) and groom the Sample data. Then click Save.
Your custom pattern will now reside in the Regex Library. It will be available to Functions using the same typeahead assist as Cribl's pre-built patterns.
Within the Library, patterns shipped by Cribl will be listed under the Cribl tab, while those built by users will be found under Custom. Over time, Cribl LogStream will ship more patterns, and this distinction allows for both sets to grow independently.
In the case of an ID/Name conflict, the Custom pattern takes priority in listings and search. For example, if a Cribl-provided pattern and a Custom one are both named
ipv4, the one from Cribl will not be displayed or delivered as a search result.
Updated 2 months ago