<?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: Need help with lookups issue in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/580793#M202332</link>
    <description>&lt;P&gt;The search you gave looks like it should work.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype="Sourcetype_A" s1_field4="Completed" 
| search s1_field1=$from_token$ 
| join s1_field2 [ search sourcetype="Sourcetype_B" 
  | rename s2_field1 as s1_field2 ] 
| table s1_field2, s1_field1,s2_field2,s2_field3&lt;/LI-CODE&gt;&lt;P&gt;How does it fail to produce the desired results?&lt;/P&gt;&lt;P&gt;Here is another way to do the same thing.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype="Sourcetype_A" s1_field4="Completed" 
| search s1_field1=$from_token$ 
| append [ search sourcetype="Sourcetype_B" | rename s2_field1 as s1_field2 ] 
| stats values(*) as * by s1_field2 
| table s1_field2, s1_field1,s2_field2,s2_field3&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 12 Jan 2022 14:49:03 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-01-12T14:49:03Z</dc:date>
    <item>
      <title>Need help with lookups issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/579999#M202090</link>
      <description>&lt;P&gt;Hello Team, I need help with a splunk query where I am trying to get the AWS instance ID via lookup table but I am able to get the instance name with respect to IP , please find the query below and help me with the suggestion.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=c3d_security host=ip-10-10* rule=corp_deny_all_to_untrust NOT dest_port=4431 
| table src_ip dest_ip transport dest_port application 
| lookup Blocked_Non-httptraffic.csv src_ip as src_ip outputnew dest_ip&lt;/LI-CODE&gt;&lt;P&gt;Note: I have made the csv file with lookup editor " Non-httptraffic.csv src" with two fields src_ip and dest_ip , if I am searching with above query so I am unable to get the instance name like host name with regards to IP Please help..&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 15:05:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/579999#M202090</guid>
      <dc:creator>neeltiwari</dc:creator>
      <dc:date>2022-01-05T15:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with lookups issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/580014#M202096</link>
      <description>&lt;P&gt;If the lookup table only has src_ip and dest_ip then how do you expect to get the instance name?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 15:08:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/580014#M202096</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-05T15:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with lookups issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/580038#M202108</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;Thanks for the response, yes I wont get the instance name but we have the instance name but how can I extract the two datasets to table the Instance name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Neelesh Tiwari&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 17:27:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/580038#M202108</guid>
      <dc:creator>neeltiwari</dc:creator>
      <dc:date>2022-01-05T17:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with lookups issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/580049#M202113</link>
      <description>&lt;P&gt;You say you have the instance name, but there is field in the given query that appears to contain that information.&amp;nbsp; Where is the instance name?&amp;nbsp; What the "two datasets" to which you refer?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 20:45:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/580049#M202113</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-05T20:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with lookups issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/580359#M202207</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;Yes, I get confused so basically I gave two searches so if I combine it so I will be able to get the data so can you help that how can I combine the two query.&lt;/P&gt;&lt;P&gt;aws-description-resource( (aws_account_id="*") , (region="*") , "ec2_instances")&lt;BR /&gt;| search (private_ip_address="172.20.187.54")&lt;/P&gt;&lt;P&gt;index=c3d_security host=ip-172-23* rule=corp_deny_all_to_untrust NOT dest_port=4431 | table src_ip dest_ip transport dest_port application&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the help of my first query, I can get the private IP address which is machine the host name so if I merge both the query so can I get the expected result?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can this one below help me out with it.&lt;/P&gt;&lt;DIV&gt;sourcetype="Sourcetype_A" s1_field4="Completed" | search s1_field1=$from_token$ | join s1_field2 [ search sourcetype="Sourcetype_B" | rename s2_field1 as s1_field2 ] | table s1_field2, s1_field1,s2_field2,s2_field3&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-common-value-into-one-table/m-p/497485" target="_blank" rel="noopener nofollow noreferrer"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-common-value-into-one-table/m-p/497485&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Neelesh Tiwari&lt;/DIV&gt;</description>
      <pubDate>Sun, 09 Jan 2022 09:51:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/580359#M202207</guid>
      <dc:creator>neeltiwari</dc:creator>
      <dc:date>2022-01-09T09:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with lookups issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/580793#M202332</link>
      <description>&lt;P&gt;The search you gave looks like it should work.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype="Sourcetype_A" s1_field4="Completed" 
| search s1_field1=$from_token$ 
| join s1_field2 [ search sourcetype="Sourcetype_B" 
  | rename s2_field1 as s1_field2 ] 
| table s1_field2, s1_field1,s2_field2,s2_field3&lt;/LI-CODE&gt;&lt;P&gt;How does it fail to produce the desired results?&lt;/P&gt;&lt;P&gt;Here is another way to do the same thing.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype="Sourcetype_A" s1_field4="Completed" 
| search s1_field1=$from_token$ 
| append [ search sourcetype="Sourcetype_B" | rename s2_field1 as s1_field2 ] 
| stats values(*) as * by s1_field2 
| table s1_field2, s1_field1,s2_field2,s2_field3&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Jan 2022 14:49:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/580793#M202332</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-12T14:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with lookups issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/584019#M203381</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;Thank you and I could not try this out due to some issues and will try it today and keep you updated.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Neelesh&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 20:15:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/584019#M203381</guid>
      <dc:creator>neeltiwari</dc:creator>
      <dc:date>2022-02-07T20:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with lookups issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/584083#M203409</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt; I have followed the query and this is how I should write it.&lt;/P&gt;&lt;P&gt;First query:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(index="main" OR index="c3d_infra") sourcetype="aws:description" aws_account_id="*" region="*" source="*:ec2_instances" | search private_ip_address="172.19.122.6"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Second query:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"&amp;nbsp;index=c3d_security host=ip-172-23* rule=corp_deny_all_to_untrust NOT dest_port=3031 | table src_ip dest_ip transport dest_port application"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I merge it , please check below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sourcetype="aws:description" s1_field4="Completed"&lt;BR /&gt;| search s1_field1=$from_token$&lt;BR /&gt;| append [ search sourcetype="pan:traffic" | rename s2_field1 as s1_field2 ]&lt;BR /&gt;| stats values(*) as * by s1_field2&lt;BR /&gt;| table s1_field2, s1_field1,s2_field2,s2_field3&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or do I have to write like this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"&amp;nbsp;index=c3d_security host=ip-172-23* rule=corp_deny_all_to_untrust NOT dest_port=3031 | table src_ip dest_ip transport dest_port application" | sourcetype="aws:description" s1_field4="Completed"&lt;BR /&gt;| search s1_field1=$from_token$&lt;BR /&gt;| append [ search sourcetype="pan:traffic" | rename s2_field1 as s1_field2 ]&lt;BR /&gt;| stats values(*) as * by s1_field2&lt;BR /&gt;| table s1_field2, s1_field1,s2_field2,s2_field3&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 10:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/584083#M203409</guid>
      <dc:creator>neelesh_tiwari</dc:creator>
      <dc:date>2022-02-08T10:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with lookups issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/584117#M203413</link>
      <description>&lt;P&gt;Why does the merged query look nothing like the two original queries?&amp;nbsp; I expected something more like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index="main" OR index="c3d_infra") sourcetype="aws:description" aws_account_id="*" region="*" source="*:ec2_instances" 
| search private_ip_address="172.19.122.6"
| append [ search index=c3d_security host=ip-172-23* rule=corp_deny_all_to_untrust NOT dest_port=3031 
  | table src_ip dest_ip transport dest_port application ]
| stats values(*) as * by &amp;lt;&amp;lt;some field(s) common to both searches&amp;gt;&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 14:21:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-lookups-issue/m-p/584117#M203413</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-02-08T14:21:21Z</dc:date>
    </item>
  </channel>
</rss>

