{"id":60458,"date":"2022-07-13T12:32:35","date_gmt":"2022-07-13T12:32:35","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=60458"},"modified":"2022-07-13T12:32:35","modified_gmt":"2022-07-13T12:32:35","slug":"answer-by-warren-for-splunk-field-extractor-unable-to-extract-all-values","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=60458","title":{"rendered":"Answer by warren for Splunk field extractor unable to extract all values"},"content":{"rendered":"<p><em>Normally<\/em> Splunk will pull key-value pairs out automatically<\/p>\n<p>However, when it doesn&#8217;t, go try your regular expression(s) on <a href=\"https:\/\/regex101.com\/r\/9HgTJl\/1\" rel=\"nofollow noreferrer\">regex101<\/a> &#8211; the field extractor is often a good[ish] <em>start<\/em>, but rarely creates efficient (or complete) regular expressions<\/p>\n<p>An inline version of this would be as follows (presuming the &quot;value&quot; half of the key-value pair is contiguous characters):<\/p>\n<pre><code>| rex field=_raw &quot;k1=(?&lt;k1&gt;\\S+)\\s+k2=(?&lt;k2&gt;\\S+)\\s+k3=(?&lt;k3&gt;\\S+)\\s+k4=(?&lt;k4&gt;\\S+)\\s+k5=(?&lt;k5&gt;\\S+)&quot;\n<\/code><\/pre>\n<p><em>Normally<\/em> I prefer to do sequential <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/SearchReference\/rex\" rel=\"nofollow noreferrer\"><code>rex<\/code><\/a> calls, in case something&#8217;s out of order or missing, but if your data&#8217;s <em>consistent<\/em>, this will work<\/p>\n<p>Once you have it the way you want it, update your <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/Admin\/Propsconf\" rel=\"nofollow noreferrer\"><code>props.conf<\/code><\/a> and <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/Admin\/Transformsconf\" rel=\"nofollow noreferrer\"><code>transforms.conf<\/code><\/a> as appropriate for the <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/Data\/Createsourcetypes\" rel=\"nofollow noreferrer\">sourcetype<\/a><\/p>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/72965208\/splunk-field-extractor-unable-to-extract-all-values\/72966267#72966267<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Normally Splunk will pull key-value pairs out automatically However, when it doesn&#8217;t, go try your regular expression(s) on regex101 &#8211; the field extractor is often a good[ish] start, but rarely creates efficient (or complete) regular expressions An inline version of this would be as follows (presuming the &quot;value&quot; half of the key-value pair is contiguous &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=60458\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Answer by warren for Splunk field extractor unable to extract all values<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[991],"keyring_services":[],"class_list":["post-60458","post","type-post","status-publish","format-standard","hentry","category-blih","tag-stackexchange"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/60458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=60458"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/60458\/revisions"}],"predecessor-version":[{"id":60459,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/60458\/revisions\/60459"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=60458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=60458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=60458"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=60458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}