<?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: help to filter data after a loadjob command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493554#M194426</link>
    <description>&lt;P&gt;HI&lt;BR /&gt;
like I said i am fonding a solution for thats working with stats in the search and not after loadjob&lt;BR /&gt;
sorry no output for the loadjob command, I have just any results&lt;/P&gt;</description>
    <pubDate>Tue, 26 Nov 2019 12:17:29 GMT</pubDate>
    <dc:creator>jip31</dc:creator>
    <dc:date>2019-11-26T12:17:29Z</dc:date>
    <item>
      <title>help to filter data after a loadjob command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493552#M194424</link>
      <description>&lt;P&gt;hi&lt;BR /&gt;
I use the scheduled search below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`winevent` (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" AND source="WinEventLog:Microsoft-Windows-Sysmon/Operational")
| fields host sourcetype source 
| stats dc(host) as host by sourcetype 
| sort -host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In my dashboard, I use a text box in order to be able to filter the results by host&lt;BR /&gt;
So I call the scheduled search from my dashboard like this :&lt;BR /&gt;
| loadjob savedsearch="admin:xxxxx:wineventbysourcetype" &lt;BR /&gt;
| search host=$tok_filterhost$&lt;/P&gt;

&lt;P&gt;The problem is that I can see my data but I am unable to filter by host&lt;BR /&gt;
I succeed to filter by host if I put the stats command after the token filter :&lt;BR /&gt;
    | search host=$tok_filterhost$&lt;BR /&gt;
    | stats.....&lt;/P&gt;

&lt;P&gt;But what I need is to keep the stats command in the scheduled search&lt;BR /&gt;
so what is missing in my search please??&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 06:51:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493552#M194424</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-11-26T06:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: help to filter data after a loadjob command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493553#M194425</link>
      <description>&lt;P&gt;Hi @jip31,&lt;BR /&gt;
I tried something like your search&lt;BR /&gt;
&lt;STRONG&gt;main search&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog | head 3000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;second search&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| loadjob 1574769641.9641 | search NOT EventCode=4672 | stats count BY EventCode
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and it's running!&lt;/P&gt;

&lt;P&gt;Could you share the output of the loadjob command?&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 12:08:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493553#M194425</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-26T12:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: help to filter data after a loadjob command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493554#M194426</link>
      <description>&lt;P&gt;HI&lt;BR /&gt;
like I said i am fonding a solution for thats working with stats in the search and not after loadjob&lt;BR /&gt;
sorry no output for the loadjob command, I have just any results&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 12:17:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493554#M194426</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-11-26T12:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: help to filter data after a loadjob command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493555#M194427</link>
      <description>&lt;P&gt;Hi @jip31,&lt;BR /&gt;
In my example it runs:&lt;BR /&gt;
&lt;STRONG&gt;main search&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog | head 3000 | stats count BY EventCode
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;second search&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| loadjob 1574770940.9780 | search EventCode=4624
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Anyway, did you explored the opportunity to use summary indexes?&lt;BR /&gt;
you can archive the output of searches using collect or tscollect.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 12:24:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493555#M194427</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-26T12:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: help to filter data after a loadjob command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493556#M194428</link>
      <description>&lt;P&gt;Yes I think its something like this and if you see my example its almost what I am doing&lt;BR /&gt;
But, the problem is that I cant done : &lt;BR /&gt;
     | stats dc(host) as host by sourcetype host&lt;/P&gt;

&lt;P&gt;It means that its impossible to stats host and to do a filter.... by host&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 12:35:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493556#M194428</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-11-26T12:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: help to filter data after a loadjob command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493557#M194429</link>
      <description>&lt;P&gt;Hi @jip31,&lt;BR /&gt;
I don't know if this is the problem, but you cannot use the same field name in as and in by.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats dc(host) as host by sourcetype host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Anyway i tried a search&lt;BR /&gt;
main search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog | head 3000 | stats dc(EventCode) As ec count BY Dominio_account EventCode
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;second search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| loadjob 1574775632.10229 | stats count BY Dominio_account
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 13:44:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493557#M194429</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-26T13:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: help to filter data after a loadjob command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493558#M194430</link>
      <description>&lt;P&gt;thanks but its no exactly correspond to my expectations&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 14:05:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493558#M194430</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-11-26T14:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: help to filter data after a loadjob command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493559#M194431</link>
      <description>&lt;P&gt;Hi @jip31,&lt;BR /&gt;
what's the problem: to use host two times in stats or other?&lt;BR /&gt;
Thi isn't possible also in a normal stats command.&lt;/P&gt;

&lt;P&gt;You could run:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; `winevent` (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" AND source="WinEventLog:Microsoft-Windows-Sysmon/Operational")
 | fields host sourcetype source 
 | stats dc(host) as dc_host by sourcetype host
 | sort -host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 14:14:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493559#M194431</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-26T14:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: help to filter data after a loadjob command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493560#M194432</link>
      <description>&lt;P&gt;Everything should work as-is with the possible exception of  &lt;CODE&gt;sort - host&lt;/CODE&gt; which is trimming your results set to 1000.  Try switching to &lt;CODE&gt;sort 0 - host&lt;/CODE&gt; and all should be good.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 23:45:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493560#M194432</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-26T23:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: help to filter data after a loadjob command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493561#M194433</link>
      <description>&lt;P&gt;ok thanks &lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 06:00:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-filter-data-after-a-loadjob-command/m-p/493561#M194433</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-11-28T06:00:12Z</dc:date>
    </item>
  </channel>
</rss>

