{"id":105543,"date":"2025-03-12T12:51:37","date_gmt":"2025-03-12T04:51:37","guid":{"rendered":"https:\/\/version-2.com\/?p=105543"},"modified":"2025-03-12T15:01:40","modified_gmt":"2025-03-12T07:01:40","slug":"graylog-parsing-rules-and-ai-oh-my","status":"publish","type":"post","link":"https:\/\/version-2.com\/en\/2025\/03\/graylog-parsing-rules-and-ai-oh-my\/","title":{"rendered":"Graylog Parsing Rules and AI Oh My!"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"105543\" class=\"elementor elementor-105543\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-35fe5dd post-content elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"35fe5dd\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;_id&quot;:&quot;cef08c3&quot;,&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:&quot;1&quot;,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-409a2e9a\" data-id=\"409a2e9a\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5a8be8f elementor-widget elementor-widget-text-editor\" data-id=\"5a8be8f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2024\/02\/GraylogParsingRulesandAIOhMy.jpg.webp\" width=\"1200\" height=\"628\" \/><\/p><div class=\"elementor-widget-container\"><p class=\"lazyloaded\">In the log aggregation game, the biggest difficulty you face can be setting up parsing rules for your logs.\u00a0To qualify this statement: simply getting log files into Graylog is easy. Graylog also has out-of-the-box parsing of a wide variety of common log sources, so if your logs fall into one of the many categories of log for which there is either a dedicated Input; a dedicated Illuminate component; or that uses a defined Syslog format; then yes, parsing logs is also easy.<\/p><p>\u00a0<\/p><p>The challenge arises when you have a log source that does not neatly fall into one of these parsed out-of-the-box categories. A Graylog <strong>Raw\/Plaintext<\/strong> input will accept just about any log format you can find, so getting the message into Graylog without parsing isn\u2019t hard.<\/p><p>The difficulty is usually then turning your message from being a block of raw text that looks like this:<\/p><p><picture class=\"aligncenter size-full wp-image-16502\"> <source id=\"MjgxNDozOTQ=-1\" srcset=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-primer-fig1.png.webp 1024w, https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-primer-fig1-300x224.png.webp 300w, https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-primer-fig1-768x574.png.webp 768w\" type=\"image\/webp\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/> <img decoding=\"async\" id=\"MjgxNTo1MjQ=-1\" class=\"lazyloaded\" src=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-primer-fig1.png\" sizes=\"(max-width: 1024px) 100vw, 1024px\" srcset=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-primer-fig1.png 1024w, https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-primer-fig1-300x224.png 300w, https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-primer-fig1-768x574.png 768w\" alt=\"\" width=\"1024\" height=\"765\" \/> <\/picture><\/p><p>\u00a0<\/p><p>Into a useful array of fields that can be searched and aggregated, like this:<\/p><p><picture class=\"aligncenter size-full wp-image-16503\"> <source id=\"MjgyMTo1MDQ=-1\" srcset=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.2.png.webp 935w, https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.2-271x300.png.webp 271w, https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.2-924x1024.png.webp 924w, https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.2-768x851.png.webp 768w\" type=\"image\/webp\" sizes=\"(max-width: 935px) 100vw, 935px\" \/> <img decoding=\"async\" id=\"MjgyMjo2MDk=-1\" class=\"lazyloaded\" src=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.2.png\" sizes=\"(max-width: 935px) 100vw, 935px\" srcset=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.2.png 935w, https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.2-271x300.png 271w, https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.2-924x1024.png 924w, https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.2-768x851.png 768w\" alt=\"\" width=\"935\" height=\"1036\" \/> <\/picture><\/p><p>It is difficult to provide a step by step process on how to parse a log message. Log messages do not obligingly follow a widely agreed-upon format. Developers often make up their own log formats on the fly, and don\u2019t necessarily do so with a lot of thought to how easy it will be to parse later. It follows that the process of breaking log messages down into fields is usually bespoke. It is a common joke in the field that even as technology gets better, parsing data that can be given in a wide array of different formats \u2013 in particular, timestamps \u2013\u00a0 remains very challenging.<\/p><p><picture class=\"aligncenter size-full wp-image-16504\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.3.png.webp\" width=\"616\" height=\"208\" \/><\/picture><\/p><p>\u00a0<\/p><p>Since there is no one-size-fits-all approach, and we understand that you are too good-looking and busy for an exhaustive manual on every single approach to parsing, this guide will instead just try to provide useful quick examples and links to the primary methods of parsing logs. We will assume in all the subsequent examples, that the text that needs parsing is in the <strong>$message.message<\/strong> field \u2013 when lifting Pipeline rules from this guide, remember to replace this field in the code block with the field from which you are trying to parse text.<\/p><h3>1. Look for Delimiters<\/h3><p>Fields that are <em>consistently<\/em> separated by a delimiter \u2013 a comma, a pipe, a space \u2013 are very easy to parse.For example, the message:<\/p><pre><code>Graylog 100 awesome<\/code><\/pre><p>Let\u2019s say this message lists a software; its review score; and one word review summary. The following pipeline rule will parse named fields out of the contents of <strong>$message.message<\/strong> (eg. the message field), delimited by a \u201c \u201c (a space). Changing the character within those speech marks allows you to delimit by other characters. The fields are extracted (and so named) in the order they appear.<\/p><pre><code>Rule \"Parse fields from message\"\nwhen   \ntrue\nthen\n    let pf = split(\n           pattern: \" \",\n           value: to_string($message.message)\n           );\nset_field(\"fieldname_1\",pf[0]);\nset_field(\"fieldname_2\",pf[1]);\nset_field(\"fieldname_3\",pf[2]);\n\nend<\/code><\/pre><p>For example, if the message field is currently \u201cGraylog 100 awesome\u201d, this rule would create three new fields with the current values:<\/p><p><strong>fieldname_1:<\/strong> \u201cGraylog\u201d<\/p><p><strong>fieldname_2:<\/strong> \u201c100\u201d<\/p><p><strong>fieldname_3:<\/strong> \u201cawesome\u201d<\/p><p>Very easy!<\/p><p>We can also change the delimiter to be \u201c,\u201d or \u201c, \u201c or \u201c|\u201d as needed by changing the value in the <strong>pattern <\/strong>field. Now, sometimes a message is very nearly <em>consistently<\/em> separated by a delimiter, but there are some annoying junk characters messing the parsing up. For those cases, here is an example of the same pipeline rule, but which first removes any annoying square bracket characters from the message, before then parsing it into space delimited fields.<\/p><pre><code>rule \"Parse fields from message\"\nwhen   \ntrue\nthen\n\n    let cleaned = to_string($message.message);\n    let cleaned = regex_replace(\n\n           pattern: \"^\\\\[|\\\\]$\",\n           value: cleaned,\n           replacement: \"\"\n   );\n    let pf = split(\n           pattern: \" \",\n           value: to_string(cleaned)\n           );\nset_field(\"fieldname_1\",pf[0]);\nset_field(\"fieldname_2\",pf[1]);\nset_field(\"fieldname_3\",pf[2]);\n\nend<\/code><\/pre><p>This technique of \u201ccleaning\u201d values from messages before parsing can of course be copy-pasted to act before any other parsing method.<\/p><h3>2. Look for Key Value Pairs<\/h3><p>Messages that consist of a list of key value pairs are also very easy to parse.<br \/>For example, the message:<\/p><pre><code>fieldname_1=graylog fieldname_2=100 fieldname_3=awesome<\/code><\/pre><p>Key Value Pairs is also the extraction method you would employ if the contents of $message.message (eg. the message field) looked like this:<\/p><pre><code>\u201cfieldname_1\u201d=\u201dgraylog\u201d \u201cfieldname_2\u201d=\u201d100\u201d \u201cfieldname_3\u201d=\u201dawesome\u201c<\/code><\/pre><p>Or like this:<\/p><pre><code>fieldname_1=\u2019graylog\u2019,fieldname_2=\u2019100\u2019,fieldname_3=\u2019awesome\u2019 Or like this:\u201cfieldname_1\u201d,\u201dgraylog\u201d \u201cfieldname_2\u201d,\u201d100\u201d \u201cfieldname_3\u201d,\u201dawesome\u201c<\/code><\/pre><p>Any consistent format that lists a field name followed by a value is a good target for this parsing approach.<\/p><p>There is a nice Graylog Blog post that talks about Key Value Pair extraction in great detail <a href=\"https:\/\/graylog.org\/post\/key-value-parser\/\">here<\/a> and documentation on using the function <a href=\"https:\/\/go2docs.graylog.org\/5-0\/making_sense_of_your_log_data\/functions_descriptions.html?Highlight=parse_date#keyvalue\">here<\/a>. For the reader who is too executive to have time to read a whole blog post right now, here is a pipeline rule that would parse that last example (observe that we are trimming the \u201c characters from both the key and values, and that \u201c has to be escape-character-ed to be \\\u201d):<\/p><pre><code>rule \u201ckey_value_parser\u201d\n\nwhen\ntrue\nthen\nset_fields(\n   fields:key_value(\n   value: to_string($message.message),\n   trim_value_chars: \"\\\"\",\n   trim_key_chars:\"\\\"\",\n   delimiters:\" \",\n   kv_delimiters:\",\"\n)\n);\nend<\/code><\/pre><p>This rule would again create three new fields with the current values:<\/p><p><strong>fieldname_1:<\/strong> \u201cGraylog\u201d<br \/><strong>fieldname_2:<\/strong> \u201c100\u201d<br \/><strong>fieldname_3:<\/strong> \u201cawesome\u201d<\/p><h2>3. Look for JSON Format<\/h2><p>JSON formatted messages are easily recognized from their structured organization of brackets and commas. JSON logs work nicely with Graylog, since the format provides not only the values but also the field names. Graylog can parse JSON format logs very simply using JSON flattening, which is detailed in the Graylog documentation <a href=\"https:\/\/go2docs.graylog.org\/5-0\/making_sense_of_your_log_data\/functions_descriptions.html?Highlight=parse_date#flattenjson\">here<\/a>.<\/p><p>If we take the below JSON message as an example:<\/p><pre><code>{\n   \"type\": \"dsdbChange\",\n   \"dsdbChange\": {\n       \"version\": {\n           \"major\": 1,\n           \"minor\": 0\n       },\n       \"statusCode\": 0,\n       \"status\": \"Success\",\n       \"operation\": \"Modify\",\n       \"remoteAddress\": null,\n       \"performedAsSystem\": false,\n       \"userSid\": \"S-1-5-18\",\n       \"dn\": \"DC=DomainDnsZones,DC=XXXXX,DC=XXXX,DC=com\",\n       \"transactionId\": \"XXXX-XXXX-XXXX-XXXX\",\n       \"sessionId\": \"XXXX-XXXX-XXXX-XXXX\",\n       \"attributes\": {\n           \"repsFrom\": {\n               \"actions\": [{\n                   \"action\": \"replace\",\n                   \"values\": [{\n                       \"base64\": true,\n                       \"value\": \"SOMELONGBASE64ENCODEDVALUE\"\n                   }]\n               }]\n           }\n       }\n   }\n}<\/code><\/pre><p>We can parse this effortlessly with a generic JSON parsing Pipeline Rule, below:<\/p><pre><code>rule \"JSON FLATTEN\"\nwhen\n   true\nthen\n   let MyJson = flatten_json(value: to_string($message.message), array_handler: \"flatten\", stringify: false);\n   set_fields(to_map(MyJson));\nend<\/code><\/pre><p>This will parse all the fields out of the JSON structure, fire and forget.<\/p><p><picture class=\"aligncenter size-full wp-image-16505\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.4.png.webp\" width=\"935\" height=\"1036\" \/><\/picture><\/p><h2>4. Look for a consistent format for Grok<\/h2><p>OK, so your logs don\u2019t follow a format that Graylog can parse out-of-the-box, are not consistently delimited, are not set up in key value pairs, are not in a JSON format. But the format is at least consistent, even if the way the fields are broken up maybe isn\u2019t. There is a structure here that we can parse using Grok. For example, the message:<\/p><p>2023-02-22T09:29:22.512-04:00 \u00a0 XXX.XXX.XXX.XXX\u00a0 &lt;179&gt;50696: Feb 22 13:29:22.512: %LINK-3-UPDOWN: Interface GigabitEthernet1\/0\/11, changed state to down<\/p><p>This log format is all over the place with delimitation of fields, but there is still a consistent pattern of fields we can see: <strong>timestamp, ip_address, priority, process_id, event_timestamp, interface_name, interface_state. <\/strong>In this situation, the easiest way to extract these fields is to use <a href=\"https:\/\/logz.io\/blog\/logstash-grok\/\">Grok<\/a>. You can read more about using Grok within a Pipeline Rule in the Graylog documentation <a href=\"https:\/\/go2docs.graylog.org\/5-0\/making_sense_of_your_log_data\/functions_descriptions.html?tocpath=Making%20Sense%20of%20Your%20Log%20Data%7CPipelines%7CFunctions%7C_____3#grok\">here<\/a>.<\/p><p>Grok might look a bit intimidating, but it\u2019s actually pretty easy once you get started. Online Grok de-buggers, such as <a href=\"http:\/\/grok.51vagaa.com\">this one<\/a>, are your best friend when writing a Grok rule. The key to writing Grok is to focus on capturing one word at a time before trying to capture the next, and to remember that whitespace \u2013 including trailing whitespace, which often catches people out \u2013 is included in the pattern.<\/p><p><strong>Here is the Grok to parse this message:<\/strong><\/p><p>%{TIMESTAMP_ISO8601:timestamp}\\s+%{IPORHOST:ip_address}\\s+&lt;%{NUMBER:priority}&gt;%{NUMBER:process_id}: %{MONTH:month}\\s+%{MONTHDAY:day}\\s+%{TIME:time}: %{GREEDYDATA:interface_name}: %{GREEDYDATA:interface_state}<\/p><p>Seen here in the Grok debugger <a href=\"https:\/\/grokdebugger.com\/\" rel=\"nofollow\">https:\/\/grokdebugger.com\/<\/a> in which it was written:<\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.5.png.webp\" width=\"1199\" height=\"1600\" \/><\/p><p>\u00a0<\/p><p>Once you have a Grok pattern that works \u2013 and check it against multiple examples of the log message, not just on one, to make sure it works <em>consistently<\/em> \u2013 the next step is to convert your Grok pattern into a Graylog Pipeline Rule. Note that all escape characters within your Grok string need to be prefaced with a \\, including \u201c\\\u201d.<\/p><p><strong>Here is the pipeline rule for parsing the message field using this Grok rule:<\/strong><\/p><pre><code>rule \"Parse Grok\"\nwhen\n   true\nthen\nlet MyGrok = grok(\n   Pattern: \"%{TIMESTAMP_ISO8601:timestamp}\\\\s+%{IPORHOST:ip_address}\\\\s+&lt;%{NUMBER:priority}&gt;%{NUMBER:process_id}: %{MONTH:month}\\\\s+%{MONTHDAY:day}\\\\s+%{TIME:time}: %{GREEDYDATA:interface_name}: %{GREEDYDATA:interface_state}\",\n   value: to_string($message.message),\n   only_named_captures: true\n);\nset_fields(\n   fields: MyGrok\n);\nend<\/code><\/pre><h3>5. Nothing is consistent? Time for Regex<\/h3><p>If the field you need to extract from your data is really inconsistently placed, and none of these techniques are useful, then it\u2019s probably time to write some Regex.<\/p><p>Regex can be used in Pipeline Rules much the same as Grok, though it is better suited to scalpelling out a single tricky field than trying to parse a whole message into fields. There is a Graylog Documentation page on using Regex in Pipeline Rules <a href=\"https:\/\/go2docs.graylog.org\/5-0\/making_sense_of_your_log_data\/functions_descriptions.html?tocpath=Making%20Sense%20of%20Your%20Log%20Data%7CPipelines%7CFunctions%7C_____3#regex\">here<\/a>. Regex is especially useful when capturing errors or stacktraces, which can blow out to many lines of text and otherwise confuse your parsers.<\/p><p><strong>For example, the message:<\/strong><\/p><pre>26\/03\/2023 08:03:32.207 ERROR:  Error in EndVerifySealInBatch()Rep.dingo.Library.Serialisation.dingoHelperException: The exception has occured in one of the dingo Helper classes: ISL_LINK                \nServer stack trace:\n   at Rep.dingo.Library.Serialisation.DataFrame.VerifySeal(dingoSecurity2 itsSecure, Boolean dyeISRN, Byte[]&amp; native, shipmentType shipmentType)\n   at Rep.dingo.Library.MessageProcessor.Incoming.Class1Handler.AsyncVerifySeal(Boolean decryptIsrn, DataFrame df, Byte[]&amp; dfNative)\n   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]&amp; outArgs)\n   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)\nException rethrown at [0]:\n   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)\n   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData&amp; msgData)\n   at Rep.dingo.Library.MessageProcessor.Incoming.Class1Handler.AsyncVerifySealDelegate.EndInvoke(Byte[]&amp; dfNative, IAsyncResult result)\n   at Rep.dingo.Library.MessageProcessor.Incoming.Class1Handler.EndVerifySealInBatch()<\/pre><p>If you want to capture the first 3 words after the first occurrence of \u201cERROR\u201d in your log message, you could use a Regex rule.<\/p><p>We would highly recommend the free online Regex tool available at <a href=\"https:\/\/regex101.com\/\" data-card-appearance=\"inline\">https:\/\/regex101.com\/<\/a> for the purposes of composing your Regex.<\/p><p>In this example, the Regex rule would be: [E][R][R][O][R].\\s+(\\S+\\s\\S+\\s\\S+)<\/p><p>This would capture the value \u201cError in EndVerifySealInBatch()Rep.dingo.Library.Serialisation.dingoHelperException:\u201d<\/p><p>\u00a0<\/p><p><picture class=\"aligncenter size-full wp-image-16507\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.6.png.webp\" width=\"1600\" height=\"999\" \/><\/picture><\/p><p>Once your Regex rule is working in <a href=\"https:\/\/regex101.com\/\" data-card-appearance=\"inline\">https:\/\/regex101.com\/<\/a> then it is time to put it into a Graylog Pipeline Rule. Note that all escape characters within your Regex string need to be prefaced with a \\, including \u201c\\\u201d.Here is the Pipeline Rule for capturing the first 3 words after the first occurrence of \u201cerror\u201d in the message field using this Regex rule:<\/p><pre><code>rule \"Regex field extract\"\nwhen\ntrue\nthen\n let MyRegex = regex(\"[E][R][R][O][R].\\\\s+(\\\\S+\\\\s\\\\S+\\\\s\\\\S+)\", to_string($message.message));\n set_field(\"MyFieldname_1\", x[\"0\"]);\n\nend<\/code><\/pre><p>This rule would create a new field with the current value:<\/p><p><strong>MyFieldname_1:<\/strong> \u201cError in EndVerifySealInBatch()Rep.dingo.Library.Serialisation.dingoHelperException:\u201d<\/p><p>Very cool!<\/p><h2>6. Stuck? Look for Extractors in the Graylog Marketplace<\/h2><p>Extractors are a legacy feature of Graylog, providing an interface for extracting fields from messages hitting an input using Regex. We recommend against creating your parsing rules using the Extractors interface, as it is rather fiddly and outdated. You can read more about Extractors and how they work in the legacy Graylog Documentation <a href=\"https:\/\/archivedocs.graylog.org\/en\/latest\/pages\/extractors.html\">here<\/a>.<\/p><p>Extractors have been around for many years, so there is A merit to continuing to use this functionality: the Graylog Open community has created a lot of useful Extractor Parsing rules over the years, and these are all available to download from the <a href=\"https:\/\/community.graylog.org\/c\/marketplace\/31\">Graylog Marketplace<\/a>.<\/p><p>If you require a parser for the complex logs of a <strong>common<\/strong> hardware device or software suite, it can be worth checking if the Graylog Open Community has already produced them. Work smarter not harder: downloading someone else\u2019s ready-made parser is often quicker than writing your own \ud83d\ude0e<\/p><p><u>Be mindful however<\/u> that this option is presented late in this guide because it is something of a last resort. Extractors are a vestigial mechanism, and being community written and maintained, carry no guarantee on being correct, up to date, or even working. There will often be a bit of TLC required to get such content working and up to date.<\/p><h2>7. Stuck? ChatGPT can write both Graylog Pipeline Rules and GROK\/Regex Parsing\u2026 sometimes.<\/h2><p>Technology is a beautiful thing! <a href=\"https:\/\/chat.openai.com\/\">ChatGPT<\/a>, the AI that needs no introduction, can write Graylog Pipeline rules. It can also write GROK or Regex parsers \u2013 just paste in your log sample and ask nicely. This is really useful in theory and can often point you in the right direction, but be warned that in practice, the AI will make various mistakes. Rather than entering your requests into ChatGPT directly, we recommend checking out this useful Community tool that leverages OpenAI\u2019s GPT API and an extensive prompt designed to improve results.<\/p><p><a href=\"https:\/\/pipe-dreams.vercel.app\/\">https:\/\/pipe-dreams.vercel.app\/<\/a><\/p><p>\u00a0<\/p><p><picture class=\"aligncenter size-full wp-image-16508\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.7.png.webp\" width=\"1600\" height=\"1108\" \/><\/picture><\/p><p>AI is far from perfect at these tasks at this stage, but still very useful \u2013 particularly at showing syntax and structure. Please note the tabs on the top left that switch between Pipeline and GROK parsing modes.<\/p><p><picture class=\"aligncenter size-full wp-image-16509\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2023\/08\/Parsing-Logs-with-Graylog-Primer-fig.8.png.webp\" width=\"1600\" height=\"1120\" \/><\/picture><\/p><p>\u00a0<\/p><h2>8. I am still stuck \u2013 Parsing logs is hard!<\/h2><p>Yes, parsing logs can be hard. If you really get stuck, and you still can\u2019t parse your logs, there are several avenues for assistance you might pursue.<\/p><ul><li class=\"nitro-lazy\">If your log message is from a <strong>common<\/strong> network hardware device or a software suite <strong>with a security focus<\/strong>, maybe we can write it for you! Graylog has a standing offer to create parsing rules for <strong>Enterprise Customers<\/strong> in these circumstances, for free and within 30 days. Simply provide the device model, the firmware version, and a sample log file (sanitize it first of course) containing at least 20 lines of log text to <strong>Graylog Support<\/strong>, and we will seek to include parsing rules for your device in a subsequent release of Illuminate.<\/li><li class=\"nitro-lazy\">Ask for help on the <a href=\"https:\/\/community.graylog.org\/\">Graylog Community Forums<\/a>. People do this for fun!<\/li><li class=\"nitro-lazy\">For <strong>Enterprise Customers,<\/strong> ask for help with a specific rule that you can\u2019t get working from <strong>Graylog Support<\/strong>. Graylog Support cannot write your parsers for you, but they are more than happy to point out where you might be going wrong if you can provide them with the Pipeline Rule in question.<\/li><li class=\"nitro-lazy\">For <strong>Enterprise Customers,<\/strong> ask your <strong>Customer Success Manager<\/strong> about a Graylog Professional Services Engagement. Professional Services are not free, but it never hurts to have the option to call in the experts for a day to write your parsing rules, should you need it!<\/li><\/ul><p>\u00a0<\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2004c86 elementor-widget elementor-widget-shortcode\" data-id=\"2004c86\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\n\t\t<div data-elementor-type=\"page\" data-elementor-id=\"93504\" class=\"elementor elementor-93504\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6461a578 elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"6461a578\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;_id&quot;:&quot;c4f773e&quot;,&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:&quot;1&quot;,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2f063c39\" data-id=\"2f063c39\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-14e1df2a elementor-widget elementor-widget-text-editor\" data-id=\"14e1df2a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>About Graylog\u00a0\u00a0<\/strong><br \/>At Graylog, our vision is a secure digital world where organizations of all sizes can effectively guard against cyber threats. We\u2019re committed to turning this vision into reality by providing Threat Detection &amp; Response that sets the standard for excellence. Our cloud-native architecture delivers SIEM, API Security, and Enterprise Log Management solutions that are not just efficient and effective\u2014whether hosted by us, on-premises, or in your cloud\u2014but also deliver a fantastic Analyst Experience at the lowest total cost of ownership. We aim to equip security analysts with the best tools for the job, empowering every organization to stand resilient in the ever-evolving cybersecurity landscape.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t\t\t<div data-elementor-type=\"page\" data-elementor-id=\"18103\" class=\"elementor elementor-18103\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-748947f elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"748947f\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;_id&quot;:&quot;c4f773e&quot;,&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:&quot;1&quot;,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7995c19\" data-id=\"7995c19\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a437045 elementor-widget elementor-widget-image-box\" data-id=\"a437045\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-image-box-wrapper\"><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\">About Version 2 Digital<\/h3><p class=\"elementor-image-box-description\">Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.\n<br><br>\nThrough an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.<\/p><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>In the log aggregation game, the biggest difficulty you [&hellip;]<\/p>","protected":false},"author":149011790,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1305,1303,61],"tags":[1077,1304],"class_list":["post-105543","post","type-post","status-publish","format-standard","hentry","category-1305","category-graylog","category-press-release","tag-1077","tag-graylog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Graylog Parsing Rules and AI Oh My! - Version 2<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Graylog Parsing Rules and AI Oh My! - Version 2\" \/>\n<meta property=\"og:description\" content=\"In the log aggregation game, the biggest difficulty you [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/\" \/>\n<meta property=\"og:site_name\" content=\"Version 2\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-12T04:51:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-12T07:01:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2024\/02\/GraylogParsingRulesandAIOhMy.jpg.webp\" \/>\n<meta name=\"author\" content=\"tracylamv2\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"tracylamv2\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"22 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/graylog.org\\\/post\\\/graylog-parsing-rules-and-ai-oh-my\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/2025\\\/03\\\/graylog-parsing-rules-and-ai-oh-my\\\/\"},\"author\":{\"name\":\"tracylamv2\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/person\\\/011bc7c3731c930bcfeecd52fefb6365\"},\"headline\":\"Graylog Parsing Rules and AI Oh My!\",\"datePublished\":\"2025-03-12T04:51:37+00:00\",\"dateModified\":\"2025-03-12T07:01:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/2025\\\/03\\\/graylog-parsing-rules-and-ai-oh-my\\\/\"},\"wordCount\":2064,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/graylog.org\\\/post\\\/graylog-parsing-rules-and-ai-oh-my\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn-jnkep.nitrocdn.com\\\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\\\/assets\\\/images\\\/optimized\\\/rev-ed4d356\\\/graylog.org\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/GraylogParsingRulesandAIOhMy.jpg.webp\",\"keywords\":[\"2025\",\"Graylog\"],\"articleSection\":[\"2025\",\"Graylog\",\"Press Release\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/graylog.org\\\/post\\\/graylog-parsing-rules-and-ai-oh-my\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/2025\\\/03\\\/graylog-parsing-rules-and-ai-oh-my\\\/\",\"url\":\"https:\\\/\\\/graylog.org\\\/post\\\/graylog-parsing-rules-and-ai-oh-my\\\/\",\"name\":\"Graylog Parsing Rules and AI Oh My! - Version 2\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/graylog.org\\\/post\\\/graylog-parsing-rules-and-ai-oh-my\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/graylog.org\\\/post\\\/graylog-parsing-rules-and-ai-oh-my\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn-jnkep.nitrocdn.com\\\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\\\/assets\\\/images\\\/optimized\\\/rev-ed4d356\\\/graylog.org\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/GraylogParsingRulesandAIOhMy.jpg.webp\",\"datePublished\":\"2025-03-12T04:51:37+00:00\",\"dateModified\":\"2025-03-12T07:01:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/graylog.org\\\/post\\\/graylog-parsing-rules-and-ai-oh-my\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/graylog.org\\\/post\\\/graylog-parsing-rules-and-ai-oh-my\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/graylog.org\\\/post\\\/graylog-parsing-rules-and-ai-oh-my\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn-jnkep.nitrocdn.com\\\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\\\/assets\\\/images\\\/optimized\\\/rev-ed4d356\\\/graylog.org\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/GraylogParsingRulesandAIOhMy.jpg.webp\",\"contentUrl\":\"https:\\\/\\\/cdn-jnkep.nitrocdn.com\\\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\\\/assets\\\/images\\\/optimized\\\/rev-ed4d356\\\/graylog.org\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/GraylogParsingRulesandAIOhMy.jpg.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/graylog.org\\\/post\\\/graylog-parsing-rules-and-ai-oh-my\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/version-2.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Graylog Parsing Rules and AI Oh My!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#website\",\"url\":\"https:\\\/\\\/version-2.com\\\/zh\\\/\",\"name\":\"Version 2\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/version-2.com\\\/zh\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#organization\",\"name\":\"Version 2\",\"url\":\"https:\\\/\\\/version-2.com\\\/zh\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/version-2.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/version-2.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1\",\"width\":1795,\"height\":335,\"caption\":\"Version 2\"},\"image\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/person\\\/011bc7c3731c930bcfeecd52fefb6365\",\"name\":\"tracylamv2\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g\",\"caption\":\"tracylamv2\"},\"url\":\"https:\\\/\\\/version-2.com\\\/en\\\/author\\\/tracylamv2\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Graylog Parsing Rules and AI Oh My! - Version 2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/","og_locale":"en_US","og_type":"article","og_title":"Graylog Parsing Rules and AI Oh My! - Version 2","og_description":"In the log aggregation game, the biggest difficulty you [&hellip;]","og_url":"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/","og_site_name":"Version 2","article_published_time":"2025-03-12T04:51:37+00:00","article_modified_time":"2025-03-12T07:01:40+00:00","og_image":[{"url":"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2024\/02\/GraylogParsingRulesandAIOhMy.jpg.webp","type":"","width":"","height":""}],"author":"tracylamv2","twitter_card":"summary_large_image","twitter_misc":{"Written by":"tracylamv2","Est. reading time":"22 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/#article","isPartOf":{"@id":"https:\/\/version-2.com\/zh\/2025\/03\/graylog-parsing-rules-and-ai-oh-my\/"},"author":{"name":"tracylamv2","@id":"https:\/\/version-2.com\/zh\/#\/schema\/person\/011bc7c3731c930bcfeecd52fefb6365"},"headline":"Graylog Parsing Rules and AI Oh My!","datePublished":"2025-03-12T04:51:37+00:00","dateModified":"2025-03-12T07:01:40+00:00","mainEntityOfPage":{"@id":"https:\/\/version-2.com\/zh\/2025\/03\/graylog-parsing-rules-and-ai-oh-my\/"},"wordCount":2064,"commentCount":0,"publisher":{"@id":"https:\/\/version-2.com\/zh\/#organization"},"image":{"@id":"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2024\/02\/GraylogParsingRulesandAIOhMy.jpg.webp","keywords":["2025","Graylog"],"articleSection":["2025","Graylog","Press Release"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/version-2.com\/zh\/2025\/03\/graylog-parsing-rules-and-ai-oh-my\/","url":"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/","name":"Graylog Parsing Rules and AI Oh My! - Version 2","isPartOf":{"@id":"https:\/\/version-2.com\/zh\/#website"},"primaryImageOfPage":{"@id":"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/#primaryimage"},"image":{"@id":"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2024\/02\/GraylogParsingRulesandAIOhMy.jpg.webp","datePublished":"2025-03-12T04:51:37+00:00","dateModified":"2025-03-12T07:01:40+00:00","breadcrumb":{"@id":"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/#primaryimage","url":"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2024\/02\/GraylogParsingRulesandAIOhMy.jpg.webp","contentUrl":"https:\/\/cdn-jnkep.nitrocdn.com\/GTmurwhroBoLJVMAHNGccmBVEhSunPoF\/assets\/images\/optimized\/rev-ed4d356\/graylog.org\/wp-content\/uploads\/2024\/02\/GraylogParsingRulesandAIOhMy.jpg.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/graylog.org\/post\/graylog-parsing-rules-and-ai-oh-my\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/version-2.com\/"},{"@type":"ListItem","position":2,"name":"Graylog Parsing Rules and AI Oh My!"}]},{"@type":"WebSite","@id":"https:\/\/version-2.com\/zh\/#website","url":"https:\/\/version-2.com\/zh\/","name":"Version 2","description":"","publisher":{"@id":"https:\/\/version-2.com\/zh\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/version-2.com\/zh\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/version-2.com\/zh\/#organization","name":"Version 2","url":"https:\/\/version-2.com\/zh\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/version-2.com\/zh\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/version-2.com\/wp-content\/uploads\/2020\/08\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1","contentUrl":"https:\/\/i0.wp.com\/version-2.com\/wp-content\/uploads\/2020\/08\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1","width":1795,"height":335,"caption":"Version 2"},"image":{"@id":"https:\/\/version-2.com\/zh\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/version-2.com\/zh\/#\/schema\/person\/011bc7c3731c930bcfeecd52fefb6365","name":"tracylamv2","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g","caption":"tracylamv2"},"url":"https:\/\/version-2.com\/en\/author\/tracylamv2\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pbQRKm-rsj","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/version-2.com\/en\/wp-json\/wp\/v2\/posts\/105543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/version-2.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/version-2.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/version-2.com\/en\/wp-json\/wp\/v2\/users\/149011790"}],"replies":[{"embeddable":true,"href":"https:\/\/version-2.com\/en\/wp-json\/wp\/v2\/comments?post=105543"}],"version-history":[{"count":15,"href":"https:\/\/version-2.com\/en\/wp-json\/wp\/v2\/posts\/105543\/revisions"}],"predecessor-version":[{"id":105558,"href":"https:\/\/version-2.com\/en\/wp-json\/wp\/v2\/posts\/105543\/revisions\/105558"}],"wp:attachment":[{"href":"https:\/\/version-2.com\/en\/wp-json\/wp\/v2\/media?parent=105543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/version-2.com\/en\/wp-json\/wp\/v2\/categories?post=105543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/version-2.com\/en\/wp-json\/wp\/v2\/tags?post=105543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}