<?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: problem getting results in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582517#M10308</link>
    <description>&lt;P&gt;What does your job inspector say? For example, are your subsearches being truncated, which may mean your joins find no matches.&lt;/P&gt;&lt;P&gt;Have you tried reworking the search so you don't need to use joins at all? (Joins are usually best avoided if possible due to the restrictions on subsearches.)&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jan 2022 11:05:25 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-01-26T11:05:25Z</dc:date>
    <item>
      <title>problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582515#M10307</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a query that return results if im running it for 1 hour but if im trying to run the query for more than 1 our it returns no result..&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=clientlogs sourcetype=clientlogs Mode=Real ApplicationIdentifier="*" "orders-for-open" (Action="OpenPositionRequest" AND Level=Info) 

| eval StartTime=strptime(ClientDateTime,"%Y-%m-%dT%H:%M:%S.%3N") 
| rename Request_Id AS RequestId
| stats min(StartTime) as StartTime min(_time) AS _time BY RequestId

| join RequestId
    [ search index=clientlogs sourcetype=clientlogs Mode=Real ApplicationIdentifier="*" Message="Create OrderForOpen" 
      | rename OrderID AS PushEventData_Position_OrderID ]
      
      | join PushEventData_Position_OrderID
      [ search index=clientlogs sourcetype=clientlogs Mode=Real ApplicationIdentifier="*" (Message="Position.Open" AND (PushEventData_Position_OrderType=17 OR PushEventData_Position_OrderType=18)) 
         | eval finishTime=strptime(ClientDateTime,"%Y-%m-%dT%H:%M:%S.%3N") 
         | stats min(finishTime) as finishTime min(_time) AS _time BY PushEventData_Position_OrderID ] 

| eval Latency=finishTime-StartTime 
| where Latency&amp;gt;0 
| timechart avg(Latency) span=1m&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 26 Jan 2022 10:45:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582515#M10307</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2022-01-26T10:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582517#M10308</link>
      <description>&lt;P&gt;What does your job inspector say? For example, are your subsearches being truncated, which may mean your joins find no matches.&lt;/P&gt;&lt;P&gt;Have you tried reworking the search so you don't need to use joins at all? (Joins are usually best avoided if possible due to the restrictions on subsearches.)&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 11:05:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582517#M10308</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-26T11:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582519#M10309</link>
      <description>&lt;P&gt;if im getting results for 1 hour (no matter what time) so the joins returns results&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem is it is not returning results for more than 1 our&lt;/P&gt;&lt;P&gt;if you think there is a way to run it without join i will be more than happy to see&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 11:11:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582519#M10309</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2022-01-26T11:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582525#M10310</link>
      <description>&lt;P&gt;Yes, you said that, but what does the job inspector say happened when the failing search ran compared to the successful search?&lt;/P&gt;&lt;P&gt;To remove the joins, you could try something like a single primary search&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=clientlogs sourcetype=clientlogs Mode=Real ApplicationIdentifier="*"&lt;/LI-CODE&gt;&lt;P&gt;Then evaluate various fields depending on what events you have, for example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval StartTime=if(searchmatch("\\\"orders-for-open\\\" (Action=\\\"OpenPositionRequest\\\" AND Level=Info)"),strptime(ClientDateTime,"%Y-%m-%dT%H:%M:%S.%3N"),null())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval finishTime=if(searchmatch("(Message=\\\"Position.Open\\\" AND (PushEventData_Position_OrderType=17 OR PushEventData_Position_OrderType=18))"),strptime(ClientDateTime,"%Y-%m-%dT%H:%M:%S.%3N"),null())&lt;/LI-CODE&gt;&lt;P&gt;Then gather the fields by RequestId&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats min(StartTime) as StartTime min(finishTime) as finishTime min(_time) AS _time BY RequestId&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This may not be exactly what you need, since it isn't clear exactly what your search is doing or what your events actually look like, but the gist of it is hopefully clear.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 11:58:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582525#M10310</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-26T11:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582533#M10311</link>
      <description>&lt;P&gt;this is what im getting while running for more than an hour. (im not getting this when running for 1 hour)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sarit_s_0-1643202656989.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/17679i204C05897D4B2C56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sarit_s_0-1643202656989.png" alt="sarit_s_0-1643202656989.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 13:13:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582533#M10311</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2022-01-26T13:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582555#M10312</link>
      <description>&lt;P&gt;Did you notice the message in bold about the results being truncated at 50000? This is why the longer time periods fail - the join(s) have truncated results which probably means the events you were attempting to join with have no matches, so the overall search returns no results.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 15:08:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582555#M10312</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-26T15:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582559#M10313</link>
      <description>&lt;P&gt;i took the query you suggested and add some other part but it is not returning any results (also for 1 hour)&lt;BR /&gt;&lt;BR /&gt;this part returns results :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=clientlogs sourcetype=clientlogs Mode=Real ApplicationIdentifier="*" "orders-for-open" (Action="OpenPositionRequest" AND Level=Info)
| eval StartTime=if(searchmatch("\\\"orders-for-open\\\" (Action=\\\"OpenPositionRequest\\\" AND Level=Info)"),strptime(ClientDateTime,"%Y-%m-%dT%H:%M:%S.%3N"),null())
| eval finishTime=if(searchmatch("(Message=\\\"Trading.Position.Open\\\" AND (PushEventData_Position_OrderType=17 OR PushEventData_Position_OrderType=18))"),strptime(ClientDateTime,"%Y-%m-%dT%H:%M:%S.%3N"),null())
| rename Request_Id AS RequestId
| stats min(StartTime) as StartTime min(finishTime) as finishTime min(_time) AS _time BY RequestId&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but when im adding this part there are no results :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Latency=finishTime-StartTime 
| where Latency&amp;gt;0 
| timechart avg(Latency) span=1m&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 26 Jan 2022 15:21:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582559#M10313</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2022-01-26T15:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582565#M10314</link>
      <description>&lt;P&gt;From the first search (without the where command) do the results look correct i.e. has the stats command gathered the correct information from the related events?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 15:44:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582565#M10314</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-26T15:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582566#M10315</link>
      <description>&lt;P&gt;from high level check looks like it does&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 15:45:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582566#M10315</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2022-01-26T15:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582779#M10316</link>
      <description>&lt;P&gt;what im trying to do is to join 3 searches by unique field and i couldn't find a way to do it without join&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 15:43:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582779#M10316</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2022-01-27T15:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582782#M10317</link>
      <description>&lt;P&gt;Can you share some anonymised sample events from your 3 searches? Preferably use a code block &amp;lt;/&amp;gt; when posting them to prevent formatting corruption&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 16:00:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582782#M10317</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-27T16:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582784#M10318</link>
      <description>&lt;P&gt;what i found is that this part of your query does not return any results :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval StartTime=if(searchmatch("\\\"orders-for-open\\\" (Action=\\\"OpenPositionRequest\\\" AND Level=Info)"),strptime(ClientDateTime,"%Y-%m-%dT%H:%M:%S.%3N"),null())
| eval finishTime=if(searchmatch("(Message=\\\"Trading.Position.Open\\\" AND (PushEventData_Position_OrderType=17 OR PushEventData_Position_OrderType=18))"),strptime(ClientDateTime,"%Y-%m-%dT%H:%M:%S.%3N"),null())&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Jan 2022 16:02:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582784#M10318</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2022-01-27T16:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582785#M10319</link>
      <description>&lt;P&gt;Can you post some events that it should have matched with?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 16:04:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582785#M10319</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-27T16:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582791#M10320</link>
      <description>&lt;P&gt;this is the first event and we are calulating this field between the first event and the third&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ClientDateTime":"2022-01-25T18:21:13.964Z"&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Request_Id":"ccb245e4-5c41-4e70-92a0-60ce0d435bff"&lt;/LI-CODE&gt;&lt;P&gt;the requestid is the common field i want to use, this is the field that combine all the 3 searches together&lt;/P&gt;&lt;P&gt;does it helps ?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 16:46:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582791#M10320</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2022-01-27T16:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582798#M10321</link>
      <description>&lt;P&gt;Your search could be easily simplified with stats or transactions. Also the filtering can be significantly improved.&lt;/P&gt;&lt;P&gt;Could you provide 3 examples of the logs that would be used to complete a transaction? E.g.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;OpenPositionRequest&lt;/LI&gt;&lt;LI&gt;Create OrderForOpen&lt;/LI&gt;&lt;LI&gt;Position.Open(PushEventData_Position_OrderType)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 17:29:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582798#M10321</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-01-27T17:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582801#M10322</link>
      <description>&lt;LI-CODE lang="markup"&gt;Message":"Create OrderForOpen"&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;"Action":"OpenPositionRequest"&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;"PushEventData_Position_OrderType":17&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Jan 2022 17:35:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582801#M10322</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2022-01-27T17:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582802#M10323</link>
      <description>&lt;P&gt;That helps somewhat. Could you post the entire _raw events?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 17:35:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582802#M10323</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-01-27T17:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582803#M10324</link>
      <description>&lt;P&gt;im not sure i can .. i think i will have issue with security&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 17:37:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582803#M10324</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2022-01-27T17:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582804#M10325</link>
      <description>&lt;P&gt;Not really - apart from it looks like it might be JSON, so perhaps using spath to extract the fields might make it easier.&lt;/P&gt;&lt;P&gt;If you don't want to provide sample events, it makes it difficult for us to develop sample queries to help you work out what may be the issue, so you will have to try and figure it out yourself.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 17:37:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582804#M10325</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-27T17:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582805#M10326</link>
      <description>&lt;P&gt;You can always redact the sensitive part or send it to me by PM.&lt;/P&gt;&lt;P&gt;The&amp;nbsp;Request_Id field is found on all in scope events?&lt;/P&gt;&lt;P&gt;For the last event, you are looking specifically for&amp;nbsp;PushEventData_Position_OrderType=17 OR 18?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 17:48:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/problem-getting-results/m-p/582805#M10326</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-01-27T17:48:29Z</dc:date>
    </item>
  </channel>
</rss>

