<?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: splunk regex &amp;amp; xml in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/splunk-regex-amp-xml/m-p/537208#M151847</link>
    <description>&lt;P&gt;in very simplest term..I have the query for single term either time or trxn and it worked fine.&lt;/P&gt;&lt;P&gt;I was looking for both value at the same time - trxn and time. basically I wanted to create a table with trxn and time. I did build the query but interesting not properly working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the two query I have build the responseTime coming on both are different&lt;/P&gt;&lt;P&gt;index=* source="/logs/*" direction=out CommType=messageType | rex field=_raw "^(?:[^\|\n]*\|){7}(?P&amp;lt;responseTime&amp;gt;[^\|]+)\|(?P&amp;lt;trxn&amp;gt;[^\|]+)"&lt;BR /&gt;| stats min(responseTime) AS "MinResponseTime" avg(responseTime) AS "AVG_ResponseTime" max(responseTime) AS "MaxResponseTime" by trxn&lt;BR /&gt;| eval AVG_ResponseTime=round(AVG_ResponseTime,0)&lt;BR /&gt;| sort -AVG_ResponseTime | table trxn MinResponseTime AVG_ResponseTime MaxResponseTime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=* source="/logs/*" direction=out CommType=messageType | rex field=_raw "^(?:[^\|\n]*\|){7}(?P&amp;lt;responseTime&amp;gt;[^\|]+)\|(?P&amp;lt;trxn&amp;gt;[^\|]+)"&lt;BR /&gt;| timechart span=1m avg(responseTime) by trxn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if someone can help me what is wrong here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jan 2021 13:09:58 GMT</pubDate>
    <dc:creator>ritesh14</dc:creator>
    <dc:date>2021-01-26T13:09:58Z</dc:date>
    <item>
      <title>splunk regex &amp; xml</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-regex-amp-xml/m-p/536883#M151774</link>
      <description>&lt;P&gt;question is two fold&lt;/P&gt;&lt;P&gt;question 1 -&lt;BR /&gt;here is sample log&lt;/P&gt;&lt;P&gt;|&amp;gt;messageType|2020-02-2 14:01:55.995|094a786b-4d07-498c-9c26-685aa4119a8f|unique_id|dir|not_unique|time|trxn|&amp;lt;?XML data&amp;gt;|&lt;/P&gt;&lt;P&gt;messageType and dir is interesting field from splunk.&lt;/P&gt;&lt;P&gt;here is my query&lt;BR /&gt;index=sample_index source="source_1" dir=In messageType=Web | rex field=_raw "^(?:[^\|\n]*\|){8}(?P&amp;lt;transactions&amp;gt;[^\|]+)"&lt;/P&gt;&lt;P&gt;This query works for single value like trxn here. but how to get two value trxn and time. I am looking for chart, table with avg(time) and trxn&lt;/P&gt;&lt;P&gt;question 2 -&lt;BR /&gt;from above log last part xml data. here is sample xml&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;BR /&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="&lt;A href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank" rel="noopener"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;soapenv:Body&amp;gt;&lt;BR /&gt;&amp;lt;ns3:trxn&lt;BR /&gt;xmlns:ns2="url1"&lt;BR /&gt;xmlns:ns3="url2"&amp;gt;&lt;BR /&gt;&amp;lt;ResponseCode&amp;gt;OK&amp;lt;/ResponseCode&amp;gt;&lt;BR /&gt;&amp;lt;/ns3:trxn&amp;gt;&lt;BR /&gt;&amp;lt;/soapenv:Body&amp;gt;&lt;BR /&gt;&amp;lt;/soapenv:Envelope&amp;gt;&lt;/P&gt;&lt;P&gt;how can I get trxn and responnseCode here?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 18:49:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-regex-amp-xml/m-p/536883#M151774</guid>
      <dc:creator>ritesh14</dc:creator>
      <dc:date>2021-01-22T18:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: splunk regex &amp; xml</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-regex-amp-xml/m-p/536925#M151783</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230779"&gt;@ritesh14&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can extract all in one regex;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;^(?:[^\|\n]*\|){7}(?P&amp;lt;time&amp;gt;[^\|]+)\|(?P&amp;lt;transactions&amp;gt;[^\|]+)\|[^|]+&amp;lt;ResponseCode&amp;gt;(?P&amp;lt;responseCode&amp;gt;[^\&amp;lt;]+)[^|]+ns3:(?P&amp;lt;xml_trxn&amp;gt;[^\&amp;gt;]+)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you an upvote is appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jan 2021 13:59:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-regex-amp-xml/m-p/536925#M151783</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-01-23T13:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: splunk regex &amp; xml</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-regex-amp-xml/m-p/536953#M151789</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230779"&gt;@ritesh14&lt;/a&gt;In regards to the question below, can you give a n example of where you're expecting two values for trxn and time? this can be interpreted multiple ways.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;This query works for single value like trxn here. but how to get two value trxn and time. I am looking for chart, table with avg(time) and trxn&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2021 16:49:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-regex-amp-xml/m-p/536953#M151789</guid>
      <dc:creator>spammenot66</dc:creator>
      <dc:date>2021-01-24T16:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: splunk regex &amp; xml</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-regex-amp-xml/m-p/537208#M151847</link>
      <description>&lt;P&gt;in very simplest term..I have the query for single term either time or trxn and it worked fine.&lt;/P&gt;&lt;P&gt;I was looking for both value at the same time - trxn and time. basically I wanted to create a table with trxn and time. I did build the query but interesting not properly working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the two query I have build the responseTime coming on both are different&lt;/P&gt;&lt;P&gt;index=* source="/logs/*" direction=out CommType=messageType | rex field=_raw "^(?:[^\|\n]*\|){7}(?P&amp;lt;responseTime&amp;gt;[^\|]+)\|(?P&amp;lt;trxn&amp;gt;[^\|]+)"&lt;BR /&gt;| stats min(responseTime) AS "MinResponseTime" avg(responseTime) AS "AVG_ResponseTime" max(responseTime) AS "MaxResponseTime" by trxn&lt;BR /&gt;| eval AVG_ResponseTime=round(AVG_ResponseTime,0)&lt;BR /&gt;| sort -AVG_ResponseTime | table trxn MinResponseTime AVG_ResponseTime MaxResponseTime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=* source="/logs/*" direction=out CommType=messageType | rex field=_raw "^(?:[^\|\n]*\|){7}(?P&amp;lt;responseTime&amp;gt;[^\|]+)\|(?P&amp;lt;trxn&amp;gt;[^\|]+)"&lt;BR /&gt;| timechart span=1m avg(responseTime) by trxn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if someone can help me what is wrong here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 13:09:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-regex-amp-xml/m-p/537208#M151847</guid>
      <dc:creator>ritesh14</dc:creator>
      <dc:date>2021-01-26T13:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: splunk regex &amp; xml</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-regex-amp-xml/m-p/537216#M151851</link>
      <description>&lt;P&gt;I got the problem statement&lt;/P&gt;&lt;P&gt;response times coming as comma separated value like 1,008 that is 1 sec and 8 ms.&lt;/P&gt;&lt;P&gt;how the splunk can parse comma separated digit as single INT?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 14:06:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-regex-amp-xml/m-p/537216#M151851</guid>
      <dc:creator>ritesh14</dc:creator>
      <dc:date>2021-01-26T14:06:58Z</dc:date>
    </item>
  </channel>
</rss>

