<?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 Subsearch for Multiple Indexes with Localize? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-for-Multiple-Indexes-with-Localize/m-p/62544#M15444</link>
    <description>&lt;P&gt;Hi Everyone, I'm new to Splunk and am having difficulty making a simple(ish) query.&lt;/P&gt;

&lt;P&gt;I'd like to display select fields from 3 indexes in a table, and need to use the output of a search on one index to search the other two. The end goal is to grab IP addresses from firewall logs, and use them to match hostnames and user names to each firewall event. This searches index=users using the src_ip field from index=firewall:&lt;/P&gt;

&lt;P&gt;index=users User!="del*ted" [search index=firewall | fields src_ip ] | table User src_ip | rename User AS user-id | rename src_ip AS ip-address&lt;/P&gt;

&lt;P&gt;Here's where I'm having difficulties:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;I'd like to search another index,
"network", using the src_ip(s) from
firewall and add the field "hostname"
to the results table.&lt;/LI&gt;
&lt;LI&gt;I want the searches on index=users
and index=network using src_ip from
firewall to search up to 24hrs before
the firewall log time and use the
log closest to the firewall event.&lt;/LI&gt;
&lt;LI&gt;There's another field in the firewall
index I want to add to the search
results called "event_description".&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I've tried a few different approaches, including join, and have just not been able to make this all work together. I'd really appreciate any help you guys can give. Thank You!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:27:23 GMT</pubDate>
    <dc:creator>bobjacks</dc:creator>
    <dc:date>2020-09-28T12:27:23Z</dc:date>
    <item>
      <title>Subsearch for Multiple Indexes with Localize?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-for-Multiple-Indexes-with-Localize/m-p/62544#M15444</link>
      <description>&lt;P&gt;Hi Everyone, I'm new to Splunk and am having difficulty making a simple(ish) query.&lt;/P&gt;

&lt;P&gt;I'd like to display select fields from 3 indexes in a table, and need to use the output of a search on one index to search the other two. The end goal is to grab IP addresses from firewall logs, and use them to match hostnames and user names to each firewall event. This searches index=users using the src_ip field from index=firewall:&lt;/P&gt;

&lt;P&gt;index=users User!="del*ted" [search index=firewall | fields src_ip ] | table User src_ip | rename User AS user-id | rename src_ip AS ip-address&lt;/P&gt;

&lt;P&gt;Here's where I'm having difficulties:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;I'd like to search another index,
"network", using the src_ip(s) from
firewall and add the field "hostname"
to the results table.&lt;/LI&gt;
&lt;LI&gt;I want the searches on index=users
and index=network using src_ip from
firewall to search up to 24hrs before
the firewall log time and use the
log closest to the firewall event.&lt;/LI&gt;
&lt;LI&gt;There's another field in the firewall
index I want to add to the search
results called "event_description".&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I've tried a few different approaches, including join, and have just not been able to make this all work together. I'd really appreciate any help you guys can give. Thank You!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:27:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-for-Multiple-Indexes-with-Localize/m-p/62544#M15444</guid>
      <dc:creator>bobjacks</dc:creator>
      <dc:date>2020-09-28T12:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch for Multiple Indexes with Localize?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-for-Multiple-Indexes-with-Localize/m-p/62545#M15445</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=firewall OR (index=users User!=del*ted") OR index=network
| stats latest(event_description) as event_description latest(User) as user-id latest(hostname) as hostname by src_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is probably close, though you'll get src_ip and events from before your desired time range. You can actually do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(earliest=-10h index=firewall) OR (earliest=-34h ((index=users User!=del*ted") OR index=network)) 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Sep 2012 00:59:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-for-Multiple-Indexes-with-Localize/m-p/62545#M15445</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-09-18T00:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch for Multiple Indexes with Localize?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-for-Multiple-Indexes-with-Localize/m-p/62546#M15446</link>
      <description>&lt;P&gt;Thanks gkanapathy, this definitely points me in the right direction!  I'll give this a try and report back.  &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 18:42:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-for-Multiple-Indexes-with-Localize/m-p/62546#M15446</guid>
      <dc:creator>bobjacks</dc:creator>
      <dc:date>2012-09-18T18:42:28Z</dc:date>
    </item>
  </channel>
</rss>

