<?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: Need solution on search query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-solution-on-search-query/m-p/703408#M238404</link>
    <description>&lt;P&gt;This would more efficient if indexA was a lookup table, but this query should get you started.&amp;nbsp; Others may bristle at the use of &lt;FONT face="courier new,courier"&gt;join&lt;/FONT&gt;, but they are welcome to submit alternatives.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=indexb OR index=indexa
| stats values(*) as * by transactionID
| join customerID 
    [search index=indexa]
| table timestamp customerID transactionID status type&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 02 Nov 2024 17:38:24 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2024-11-02T17:38:24Z</dc:date>
    <item>
      <title>Need solution on search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-solution-on-search-query/m-p/703388#M238401</link>
      <description>&lt;P&gt;I am having two index( index A and index B). Here I need to measure response time of topup of prepaid or postpaid number with help of transaction ID.&lt;/P&gt;&lt;P&gt;From index A I can filter where the transaction is prepaid or postpaid,index A contains(customer ID, Type(Prepaid or Postpaid).&lt;/P&gt;&lt;P&gt;In indexB we have two logs one is request log and other is response log.&lt;/P&gt;&lt;P&gt;With help of customer ID from Index A I need to find the transaction ID from Request log since customer ID is not available in response log. Once we get the transaction ID, we need to substract the time stamp (Response log time- Request log time).&lt;/P&gt;&lt;P&gt;Index A. Log pattern---&amp;gt; _timestamp, customerID,type&lt;/P&gt;&lt;P&gt;Index B----&amp;gt; contains request and response log.&lt;/P&gt;&lt;P&gt;Request log pattern---&amp;gt; timestamp, transactionID, customer ID&lt;/P&gt;&lt;P&gt;Response log pattern---&amp;gt;timestamp, transactionID,status.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method to measure --&amp;gt; From index A we need to get customerID and then go to index B to find out the transaction ID from Request log. With help of transactionID need to subtract the timestamp between response and request log from index B&lt;/P&gt;&lt;P&gt;Please help us how we can proceed,in SPL query.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2024 13:43:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-solution-on-search-query/m-p/703388#M238401</guid>
      <dc:creator>dinesh001kumar</dc:creator>
      <dc:date>2024-11-02T13:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need solution on search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-solution-on-search-query/m-p/703408#M238404</link>
      <description>&lt;P&gt;This would more efficient if indexA was a lookup table, but this query should get you started.&amp;nbsp; Others may bristle at the use of &lt;FONT face="courier new,courier"&gt;join&lt;/FONT&gt;, but they are welcome to submit alternatives.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=indexb OR index=indexa
| stats values(*) as * by transactionID
| join customerID 
    [search index=indexa]
| table timestamp customerID transactionID status type&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2024 17:38:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-solution-on-search-query/m-p/703408#M238404</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-11-02T17:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need solution on search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-solution-on-search-query/m-p/703436#M238424</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval request_time=if(isnotnull(transactionID) AND isnotnull(customerID), time, null())
| eval response_time=if(isnotnull(transactionID) AND isnull(customerID), time, null())
| eventstats values(request_time) as request_time values(response_time) as response_time values(customerID) as customerID by transactionID
| eventstats values(type) as type by customerID
| stats values(request_time) as request_time values(response_time) as response_time values(status) as status values(type) as type by customerID transactionID&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 03 Nov 2024 13:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-solution-on-search-query/m-p/703436#M238424</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-11-03T13:36:36Z</dc:date>
    </item>
  </channel>
</rss>

