<?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: Run command after having result in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599834#M49251</link>
    <description>&lt;P&gt;Ah, you can think about Splunk will do sort 5 ips, but the event will be indexed one by one follow the time of its. And in that moment, the top 5 is the top, but 5s later, the top 5 will be changed, so it will do10 requests instead of 5 request at the final&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2022 08:25:33 GMT</pubDate>
    <dc:creator>lnn2204</dc:creator>
    <dc:date>2022-05-31T08:25:33Z</dc:date>
    <item>
      <title>Dashboard element with runtime search behaviour</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599810#M49249</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I'm using ipinfo to check IPs of my system.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base search&amp;gt;
| stats sum(Download) as Download by DestIP 
| sort 5 -Size
| ipinfo DestIP&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is it didn't wait for the final result then call the command "ipinfo", it'll make more request than 5 times, depends on how much DestIP it had.&lt;/P&gt;&lt;P&gt;Are there any solutions for this case?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 09:05:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599810#M49249</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2022-06-01T09:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599833#M49250</link>
      <description>&lt;P&gt;Please be a bit more specific because there doesn't seem to be anything wrong with your search.&lt;/P&gt;&lt;P&gt;The "sort 5 - Size" part should give you 5 results and ipinfo should perform calls for those 5 results. If it's making more than one IPinfo API call per result row, that's nothing you can do withouth fiddling with internals of the app.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 08:10:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599833#M49250</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-31T08:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599834#M49251</link>
      <description>&lt;P&gt;Ah, you can think about Splunk will do sort 5 ips, but the event will be indexed one by one follow the time of its. And in that moment, the top 5 is the top, but 5s later, the top 5 will be changed, so it will do10 requests instead of 5 request at the final&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 08:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599834#M49251</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2022-05-31T08:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599839#M49252</link>
      <description>&lt;P&gt;Firstly Size doesn't exist so the sort won't do anything (of course, this could just be a typo in your example)&lt;/P&gt;&lt;P&gt;Even so, you should only get 5 events after the sort.&lt;/P&gt;&lt;P&gt;Try inserting a table command&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base search&amp;gt;
| stats sum(Download) as Download by DestIP 
| sort 5 -Download
| table DestIP Download
| ipinfo DestIP&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 31 May 2022 08:30:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599839#M49252</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-31T08:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599842#M49253</link>
      <description>&lt;P&gt;the table command was put after "ipinfo" commands, so I think it's totally fine.&lt;/P&gt;&lt;P&gt;And yes, I got just 5 row in the table, but the request was made to Ipinfo API is more than 5. Depends on how many DestIP user surfed.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 08:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599842#M49253</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2022-05-31T08:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599851#M49254</link>
      <description>&lt;P&gt;Even if you think it might be totally fine, it might be worth checking - just saying&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 08:57:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599851#M49254</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-31T08:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599865#M49255</link>
      <description>&lt;P&gt;Honestly, I don't understand the issue.&lt;/P&gt;&lt;P&gt;If you run the same search against different sets of data (for example, because of running it for different time ranges), you might get different results. So those "top 5 IPs" might indeed be different.&lt;/P&gt;&lt;P&gt;There are a few possibilities that could let you store some kind of "global state" but firstly you'd have to think what would be the expected behaviour if - for example - you got 5 IPs at the first run of your search and 3 "old" and 2 "new" IPs at next run.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 10:13:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599865#M49255</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-31T10:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599870#M49256</link>
      <description>&lt;P&gt;I don't know how to detail my issue.&lt;/P&gt;&lt;P&gt;Like you search this in 5min:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval RespondSize=round(('RespondSize'/1024)/1024,2)
| search SrcIP="$ipDownloadDetail$" 
| stats sum(RespondSize) as Size by DstIP 
| sort 5 -Size
| ipinfo DstIP
| table DstIP, org, hostname, country, Size&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And when it had run for 2-3 mins, the top 5 will be set, and when it run to the final, the top 5 will be changed. So when top 5 are set at first time, they will call the API with 5 requests, and when it run to the final stage, another 5 requests will be made&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 10:52:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599870#M49256</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2022-05-31T10:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599871#M49257</link>
      <description>&lt;P&gt;Checked it, not work hehe.&lt;/P&gt;&lt;P&gt;Do you have another solutions?&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 10:55:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599871#M49257</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2022-05-31T10:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599974#M49258</link>
      <description>&lt;P&gt;I still don't understand. If you change your search, change its conditions or time range, you can get different results. That's how it works. So what's surprising here?&lt;/P&gt;&lt;P&gt;Also if you're running two separate searches with ipinfo command in them - the command will get run separately for each result set.&lt;/P&gt;&lt;P&gt;Again - honestly, I have no idea what other behaviour you expect and why.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 18:36:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599974#M49258</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-31T18:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599996#M49259</link>
      <description>&lt;P&gt;Okay, tks for your replying. I'll try to figure it out.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 03:42:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599996#M49259</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2022-06-01T03:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599999#M49260</link>
      <description>&lt;P&gt;Is this search in a dashboard? I noticed that you have a token. Often, searches in dashboards are executed multiple times as tokens are given different values (searchWhenChanged). Is this perhaps what is going on?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 04:39:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/599999#M49260</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-01T04:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/600002#M49261</link>
      <description>&lt;P&gt;Yeah, I think it's the problem. It's in dashboard, with realtime search and a drilldown which to change the token then this dashboard can run. But my token will not change when it's running. So in my mind now, maybe about the realtime search.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 04:52:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/600002#M49261</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2022-06-01T04:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/600003#M49262</link>
      <description>&lt;P&gt;Realtime searches tie up cpus and should be used sparingly. Does your dashboard need a realtime search? Can you split off the "realtime" part of the dashboard to another dashboard? Can you use short refresh cycles to produce "near realtime" results which you can then tune to an appropriate value? How near to realtime does the dashboard need to be? Do you have someone watching the dashboard every second of every minute of every hour of every day? How quickly do they need to respond to something they see in the dashboard?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 05:22:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/600003#M49262</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-01T05:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/600004#M49263</link>
      <description>&lt;P&gt;Thank you, I'll think about that&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 05:34:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/600004#M49263</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2022-06-01T05:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Run command after having result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/600039#M49264</link>
      <description>&lt;P&gt;So that's a completely different problem. It's not about search as such but about the fact that when you're running a realtime search the results are indeed being updated as the search progresses.&lt;/P&gt;&lt;P&gt;That's "by design". As &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt; already pointed out, real-time searches are not supposed to be used often. In fact, it's best to avoid them altogether (there are very few use cases when they are indeed justified).&lt;/P&gt;&lt;P&gt;With a normal historical ad-hoc search, ever run of your search will produce a set of results which will be passed to your command which calls external IP and that's it. But remember that if you have a refresh set on your dashboard, every time the dashboard refreshes, the search will get re-run however so your API calls will be performed again. That's simply how it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 09:03:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-element-with-runtime-search-behaviour/m-p/600039#M49264</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-06-01T09:03:39Z</dc:date>
    </item>
  </channel>
</rss>

