{"id":43486,"date":"2021-09-22T20:12:54","date_gmt":"2021-09-22T20:12:54","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=43486"},"modified":"2021-09-22T20:12:54","modified_gmt":"2021-09-22T20:12:54","slug":"answer-by-warren-for-splunk-how-to-extract-two-fileds-distinct-count-one-field-by-the-other-field","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=43486","title":{"rendered":"Answer by warren for Splunk &#8211; How to extract two fileds distinct count one field by the other field?"},"content":{"rendered":"<p>First, you&#8217;re grouping by a field that may not exist (did you mean <code>groupId<\/code> instead of <code>serviceId<\/code>?)<\/p>\n<p>Second, are you <em>sure<\/em> your regular expression is correct?<\/p>\n<p>This <a href=\"https:\/\/regex101.com\/r\/5jAkcf\/1\" rel=\"nofollow noreferrer\">tested<\/a> one is simpler:<\/p>\n<pre><code>| rex field=_raw &quot;Id\\W+(?&lt;Id&gt;\\d+)\\D+groupId\\W+(?&lt;groupid&gt;\\w+)&quot;\n<\/code><\/pre>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/69288768\/splunk-how-to-extract-two-fileds-distinct-count-one-field-by-the-other-field\/69290709#69290709<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>First, you&#8217;re grouping by a field that may not exist (did you mean groupId instead of serviceId?) Second, are you sure your regular expression is correct? This tested one is simpler: | rex field=_raw &quot;Id\\W+(?&lt;Id&gt;\\d+)\\D+groupId\\W+(?&lt;groupid&gt;\\w+)&quot; from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/69288768\/splunk-how-to-extract-two-fileds-distinct-count-one-field-by-the-other-field\/69290709#69290709 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-43486","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\/43486","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=43486"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/43486\/revisions"}],"predecessor-version":[{"id":43487,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/43486\/revisions\/43487"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=43486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=43486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=43486"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=43486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}