{"id":51332,"date":"2022-02-08T15:37:16","date_gmt":"2022-02-08T15:37:16","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=51332"},"modified":"2022-02-08T15:37:16","modified_gmt":"2022-02-08T15:37:16","slug":"answer-by-warren-for-splunk-extraction-from-the-log-entries","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=51332","title":{"rendered":"Answer by warren for splunk extraction from the log entries"},"content":{"rendered":"<p>Not sure how Python and Splunk are relating here &#8211; but this is just a matter of doing some <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/Knowledge\/Aboutregularexpressionswithfieldextractions\" rel=\"nofollow noreferrer\">field extractions<\/a>.<\/p>\n<p>Something like this should do it:<\/p>\n<pre><code>index=ndx sourcetype=srctp\n| field field=_raw &quot;PlatformVersion\\W+(?&lt;platform_version&gt;[^\\&quot;]+)&quot;\n| rex field=_raw &quot;PlatformClient\\W+(?&lt;platform_client&gt;[^\\&quot;]+)&quot;\n<\/code><\/pre>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/71019040\/splunk-extraction-from-the-log-entries\/71036484#71036484<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Not sure how Python and Splunk are relating here &#8211; but this is just a matter of doing some field extractions. Something like this should do it: index=ndx sourcetype=srctp | field field=_raw &quot;PlatformVersion\\W+(?&lt;platform_version&gt;[^\\&quot;]+)&quot; | rex field=_raw &quot;PlatformClient\\W+(?&lt;platform_client&gt;[^\\&quot;]+)&quot; from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/71019040\/splunk-extraction-from-the-log-entries\/71036484#71036484 via IFTTT<\/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-51332","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\/51332","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=51332"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/51332\/revisions"}],"predecessor-version":[{"id":51333,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/51332\/revisions\/51333"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=51332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=51332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=51332"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=51332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}