<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Extracting from multiple fields and group by Domain name in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extracting-from-multiple-fields-and-group-by-Domain-name/m-p/71000#M180755</link>
    <description>&lt;P&gt;This is what I expected. Thank you very much for the quick reply. Can you explain why I am able get the host name without group by.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Sep 2013 04:58:41 GMT</pubDate>
    <dc:creator>thiagarajan</dc:creator>
    <dc:date>2013-09-24T04:58:41Z</dc:date>
    <item>
      <title>Extracting from multiple fields and group by Domain name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-from-multiple-fields-and-group-by-Domain-name/m-p/70998#M180753</link>
      <description>&lt;P&gt;My logs looks like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Tue Aug 27 2013 00:34:47 [DEV][MyTest][error] mpgw(IntegrationGateway): tid(372165969)[error][10.11.12.123]: Either service is down or transaction timed out for Service:WorkspaceData
UUID:4c4b1672-9af1-4f95-a28b-d78611bd6a6
Backend:lprva1234.test.com:6090
Domain:SpaceK

Tue Aug 27 2013 00:35:28 [DEV][MyTest][error] mpgw(IntegrationGateway): tid(379832419)[error][10.14.24.263]: Either service is down or transaction timed out for Service:MyList
UUID:8f3dc371-845c-4768-928b-35938dacffb6
Backend:lprva4567.test.com:6087
Domain:SpaceH

Tue Aug 27 2013 00:54:39 [DEV][MyTest][error] mpgw(IntegrationGateway): tid(327317173)[error][10.11.12.123]: Either service is down or transaction timed out for Service:WorkspaceData
UUID:99dafd8f-9639-4d8e-ac5d-5d0d5a35ae77
Backend:lprva7891.test.com:6090
Domain:SpaceK

Sun Sep 01 2013 00:23:27 [DEV][MyTest][error] mpgw(IntegrationGateway): tid(112725141)[error][10.11.12.123]: Either service is down or transaction timed out for Service:MyConnnect
UUID:2e57e791-e6fe-4b0e-b401-77de0a2ba511
Backend:lprva8225.test.com:6091
Domain:SpaceL

Sun Sep 01 2013 00:23:37 [DEV][MyTest][error] mpgw(IntegrationGateway): tid(112727877)[error][10.11.12.123]: Either service is down or transaction timed out for Service:MyConnnect
UUID:523b378f-14d3-41c2-8357-e8642a595c5d
Backend:lprva8228.test.com:6091
Domain:SpaceL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The regex for timedoutservice is -&amp;gt;    &lt;CODE&gt;(?i)^(?:[^:]*:){5}(?P&amp;lt;timedoutservice&amp;gt;[^\s]+)&lt;/CODE&gt;&lt;BR /&gt;
Search query is -&amp;gt; &lt;CODE&gt;sourcetype="MyLog" ("transaction timed out for Service:" MyTest) |stats count as errorcount by timedoutservice&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I am getting result something similar to this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timedoutservice                         errorcount
WorkspaceData                               2
MyList                                      1
MyConnnect                                  2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;H2&gt;Expected result&lt;/H2&gt;

&lt;PRE&gt;&lt;CODE&gt;timedoutservice                        errorcount        Domain
WorkspaceData                               2            SpaceK
MyList                                      1            SpaceH
MyConnnect                                  2            SpaceL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;UUID and Backend will be changing but the domain name remains same for all the services.&lt;BR /&gt;
The regex for domainName is  -&amp;gt; &lt;CODE&gt;(?i)\tDomain:(?P&amp;lt;Domain&amp;gt;.+)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I just tried to combine both the results&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((?i)^(?:[^:]*:){5}(?P&amp;lt;timedoutservice&amp;gt;[^\s]+)(?i)\tDomain:(?P&amp;lt;Domain&amp;gt;.+))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am getting the exception "Invalid regex: no named extraction at position 0 (i.e., "((?i)^(?:[..."). Expected "(?P&lt;VARIABLE&gt;pattern)"&lt;BR /&gt;
Do i need to use group by. How to extract from multiple fields. Any help is appreciated.&lt;/VARIABLE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2013 03:48:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-from-multiple-fields-and-group-by-Domain-name/m-p/70998#M180753</guid>
      <dc:creator>thiagarajan</dc:creator>
      <dc:date>2013-09-24T03:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting from multiple fields and group by Domain name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-from-multiple-fields-and-group-by-Domain-name/m-p/70999#M180754</link>
      <description>&lt;P&gt;The field&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;domain:value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Should be extracted automatically.&lt;/P&gt;

&lt;P&gt;If it is not, have you tried the automated field extraction wizard? (down arrow key next to the event in a regular search)&lt;/P&gt;

&lt;P&gt;If it is, then something like this should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="MyLog" ("transaction timed out for Service:" MyTest) |stats count as errorcount by timedoutservice,domain
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Sep 2013 04:03:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-from-multiple-fields-and-group-by-Domain-name/m-p/70999#M180754</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-09-24T04:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting from multiple fields and group by Domain name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-from-multiple-fields-and-group-by-Domain-name/m-p/71000#M180755</link>
      <description>&lt;P&gt;This is what I expected. Thank you very much for the quick reply. Can you explain why I am able get the host name without group by.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2013 04:58:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-from-multiple-fields-and-group-by-Domain-name/m-p/71000#M180755</guid>
      <dc:creator>thiagarajan</dc:creator>
      <dc:date>2013-09-24T04:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting from multiple fields and group by Domain name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-from-multiple-fields-and-group-by-Domain-name/m-p/71001#M180756</link>
      <description>&lt;P&gt;This is what I expected. Thank you for the quick reply. But can u tell how I am getting the domain name without any group by. Is it because domain name is unique.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2013 05:16:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-from-multiple-fields-and-group-by-Domain-name/m-p/71001#M180756</guid>
      <dc:creator>thiagarajan</dc:creator>
      <dc:date>2013-09-24T05:16:55Z</dc:date>
    </item>
  </channel>
</rss>

