<?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: Can I get clarification on what my search string is doing? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286253#M86660</link>
    <description>&lt;P&gt;Ok thank you a lot, you have no idea how much you helped me out&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2016 13:56:44 GMT</pubDate>
    <dc:creator>Justin1224</dc:creator>
    <dc:date>2016-09-20T13:56:44Z</dc:date>
    <item>
      <title>Can I get clarification on what my search string is doing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286247#M86654</link>
      <description>&lt;P&gt;I have this search string, and I'm unsure of what some of it does. This is the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup append=T malware_tracker | stats min(firstTime) as firstTime,dc(dest) by signature | eval _time=firstTime | `daysago(30)` | sort 100 - firstTime | `uitime(firstTime)` | fields firstTime,signature,dc(dest)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is what I'm confused about:&lt;BR /&gt;
-I think that what the &lt;CODE&gt;inputlookup append=T malware_tracker&lt;/CODE&gt; is doing is ignoring indexes and using another input source. Is the other input source data from &lt;CODE&gt;malware_tracker&lt;/CODE&gt;? Is &lt;CODE&gt;malware_tracker&lt;/CODE&gt; even an input source? Or is the input source something/somewhere else entirely?&lt;BR /&gt;
-Again, I think the &lt;CODE&gt;stats min&lt;/CODE&gt; part is obtaining the minimum value of the &lt;CODE&gt;field (firstTime)&lt;/CODE&gt;. But what is that field? Did eval create it?&lt;BR /&gt;
-What is the &lt;CODE&gt;dc(dest) by signature&lt;/CODE&gt; part doing?&lt;BR /&gt;
-What is the &lt;CODE&gt;eval _time=firstTime&lt;/CODE&gt; part doing?&lt;BR /&gt;
-Is the very last part just showing you specific fields in the final output?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 19:07:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286247#M86654</guid>
      <dc:creator>Justin1224</dc:creator>
      <dc:date>2016-09-16T19:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get clarification on what my search string is doing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286248#M86655</link>
      <description>&lt;P&gt;I'll try and address each question here below...&lt;/P&gt;

&lt;P&gt;-I think that what the inputlookup append=T malware_tracker is doing is ignoring indexes and using another input source. Is the other input source data from malware_tracker? Is malware_tracker even an input source? Or is the input source something/somewhere else entirely?&lt;/P&gt;

&lt;P&gt;In splunk, you can have data that is indexed (stored in indexes) and/or stored as lookup tables (&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/Lookup" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/Lookup&lt;/A&gt;). Data stored in indexes (large volumes) are timeseries data whereas once stored in lookup tables (small volumes) are pretty static, used for the most part, as cross-reference. For example, you can have a list of IP address to HostName mapping stored in the lookup table, vs all data pertaining to that IP address streamed from various devices stored in indexes. &lt;CODE&gt;inputlookup&lt;/CODE&gt; command is one way to view the data stored in lookup files. In you example, there must be a lookup file called malware_tracker (probably stores static malware). The &lt;CODE&gt;append=t&lt;/CODE&gt; implies the data returned from the lookup file is appended to the current set of results rather than replacing it. So, if you have anything before the &lt;CODE&gt;| inputlookup&lt;/CODE&gt; command, the data will be appended to that. If &lt;CODE&gt;| inputlookup&lt;/CODE&gt; is the start of your search, then, there's nothing to append to.&lt;/P&gt;

&lt;P&gt;-Again, I think the stats min part is obtaining the minimum value of the field (firstTime). But what is that field? Did eval create it?&lt;BR /&gt;
If &lt;CODE&gt;| inputlookup&lt;/CODE&gt; is the start of your search, the lookup file must contain a field called &lt;CODE&gt;firstTime&lt;/CODE&gt; and &lt;CODE&gt;min(firstTime)&lt;/CODE&gt; as you correctly deduced, is the lowest value in that field.&lt;BR /&gt;
-What is the dc(dest) by signature part doing?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;dc(dest)&lt;/CODE&gt; = &lt;CODE&gt;distinct_count(dest)&lt;/CODE&gt; which is a count of distinct values in the field called &lt;CODE&gt;dest&lt;/CODE&gt;. tHE &lt;CODE&gt;by&lt;/CODE&gt; clause is for grouping the stats command. So, &lt;CODE&gt;min(firstTime)&lt;/CODE&gt; and &lt;CODE&gt;dc(dest)&lt;/CODE&gt; are grouped &lt;CODE&gt;by&lt;/CODE&gt; values in the field called &lt;CODE&gt;signature&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;-What is the eval _time=firstTime part doing?&lt;/P&gt;

&lt;P&gt;This is assigning the values of the field &lt;CODE&gt;firstTime&lt;/CODE&gt; to a field called &lt;CODE&gt;_time&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;-Is the very last part just showing you specific fields in the final output?&lt;BR /&gt;
That's right, the last part is limiting the final set of fields to &lt;CODE&gt;firstTime signature dc(dest)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:01:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286248#M86655</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2020-09-29T11:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get clarification on what my search string is doing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286249#M86656</link>
      <description>&lt;P&gt;Awesome, thank you a lot, this really helps!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 19:54:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286249#M86656</guid>
      <dc:creator>Justin1224</dc:creator>
      <dc:date>2016-09-16T19:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get clarification on what my search string is doing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286250#M86657</link>
      <description>&lt;P&gt;Just one more question, how does it group the values by the field called signature and what does that field do. Also, could you explain what fields are/do? I've read through the Splunk site on it, but I still don't really understand it very well.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:23:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286250#M86657</guid>
      <dc:creator>Justin1224</dc:creator>
      <dc:date>2016-09-16T20:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get clarification on what my search string is doing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286251#M86658</link>
      <description>&lt;P&gt;Could you just help me with this last question? How does it group the values by the field called signature and what does that field do? And I figured out what fields are. &lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 21:16:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286251#M86658</guid>
      <dc:creator>Justin1224</dc:creator>
      <dc:date>2016-09-19T21:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get clarification on what my search string is doing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286252#M86659</link>
      <description>&lt;P&gt;&lt;CODE&gt;signature&lt;/CODE&gt; must be a field in your lookup file. Grouping by signature means it will show &lt;CODE&gt;min(FirstTime)&lt;/CODE&gt; for each value in the &lt;CODE&gt;signature&lt;/CODE&gt; field&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 22:16:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286252#M86659</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-19T22:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get clarification on what my search string is doing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286253#M86660</link>
      <description>&lt;P&gt;Ok thank you a lot, you have no idea how much you helped me out&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 13:56:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-get-clarification-on-what-my-search-string-is-doing/m-p/286253#M86660</guid>
      <dc:creator>Justin1224</dc:creator>
      <dc:date>2016-09-20T13:56:44Z</dc:date>
    </item>
  </channel>
</rss>

