<?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: Using single query with two sourcetypes? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-single-query-with-two-sourcetypes/m-p/579759#M202008</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224563"&gt;@brc55&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can return events from multiple source types in one search:&lt;/P&gt;&lt;P&gt;(sourcetype=winevents OR sourcetype=vpn)&lt;/P&gt;&lt;P&gt;or:&lt;/P&gt;&lt;P&gt;sourcetype IN (winevents vpn)&lt;/P&gt;&lt;P&gt;What do you mean by "busiest" users of an IP address? Are you trying to 1) correlate winevents to the vpn IP address by hostname and 2) get the top 5 hostnames by IP address? This isn't difficult, but we'll need to know more about the fields available in the winevents and vpn source types.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jan 2022 04:03:14 GMT</pubDate>
    <dc:creator>tscroggins</dc:creator>
    <dc:date>2022-01-03T04:03:14Z</dc:date>
    <item>
      <title>Using single query with two sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-single-query-with-two-sourcetypes/m-p/579384#M201891</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have 2 sourcetypes, vpn &amp;amp; winevents, how do you write a single query to get winevents of the top 5 &lt;STRONG&gt;busiest&lt;/STRONG&gt; machines of IP X (1 IP is used by many users). The vpn sourcetype contains both hostname &amp;amp; IP, while the winevents only contains the hostname.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm assuming I'd utilize the&amp;nbsp;&lt;EM&gt;append&lt;/EM&gt; command and a sub search&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sourcetype=winevents | append [search sourcetype=vpn] | top limit=5&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help is appreciated, thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 14:21:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-single-query-with-two-sourcetypes/m-p/579384#M201891</guid>
      <dc:creator>brc55</dc:creator>
      <dc:date>2021-12-28T14:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using single query with two sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-single-query-with-two-sourcetypes/m-p/579759#M202008</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224563"&gt;@brc55&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can return events from multiple source types in one search:&lt;/P&gt;&lt;P&gt;(sourcetype=winevents OR sourcetype=vpn)&lt;/P&gt;&lt;P&gt;or:&lt;/P&gt;&lt;P&gt;sourcetype IN (winevents vpn)&lt;/P&gt;&lt;P&gt;What do you mean by "busiest" users of an IP address? Are you trying to 1) correlate winevents to the vpn IP address by hostname and 2) get the top 5 hostnames by IP address? This isn't difficult, but we'll need to know more about the fields available in the winevents and vpn source types.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 04:03:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-single-query-with-two-sourcetypes/m-p/579759#M202008</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2022-01-03T04:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using single query with two sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-single-query-with-two-sourcetypes/m-p/579766#M202010</link>
      <description>&lt;P&gt;&lt;SPAN&gt;(sourcetype=winevents OR sourcetype=vpn)&lt;/SPAN&gt;&lt;SPAN&gt;| top limit=5&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 05:48:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-single-query-with-two-sourcetypes/m-p/579766#M202010</guid>
      <dc:creator>SinghK</dc:creator>
      <dc:date>2022-01-03T05:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using single query with two sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-single-query-with-two-sourcetypes/m-p/579782#M202020</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;usually the most efficient way is use stats on this kind of cases. Based on what you are meaning with "most busiest" you should use something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index IN (vpn, winevents) sourcetype IN (&amp;lt;your sourcetypes here, separated with ,&amp;gt;)
| stats count(ip) as nIPs values(*) as * by hostname
| sort 0 - nIPs
| head 5&lt;/LI-CODE&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 08:42:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-single-query-with-two-sourcetypes/m-p/579782#M202020</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-01-03T08:42:00Z</dc:date>
    </item>
  </channel>
</rss>

