<?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: find only values in 2 index files in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/find-only-values-in-2-index-files/m-p/478375#M82128</link>
    <description>&lt;P&gt;Assuming firewall field exists in the csv file. Here sub search with &lt;CODE&gt;inputlookup&lt;/CODE&gt; command filters index gcp_firewall with values in firewall.csv file.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=gcp_firewall "data.jsonPayload.connection.src_ip"="*" 
    [| inputlookup firewall.csv 
    | rename firewall as "data.jsonPayload.rule_details.reference" 
    | fields "data.jsonPayload.rule_details.reference"] 
| rename data.jsonPayload.connection.src_ip as Source 
| rename data.jsonPayload.connection.dest_ip as Destination 
| rename data.jsonPayload.connection.dest_port as Port 
| rename data.jsonPayload.instance.vm_name as Name 
| rename data.jsonPayload.rule_details.reference as firewall 
| stats latest(*) as * by Source 
| table Source Name Destination Port firewall 
| stats count by firewall
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 20 Apr 2020 21:44:23 GMT</pubDate>
    <dc:creator>manjunathmeti</dc:creator>
    <dc:date>2020-04-20T21:44:23Z</dc:date>
    <item>
      <title>find only values in 2 index files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/find-only-values-in-2-index-files/m-p/478374#M82127</link>
      <description>&lt;P&gt;I have a index of my gcp firewalls (all of them) and I need to take that and match it against another dataset (firewalls allowed - a CSV) and then return the query for just the information that matches the values in the firewalls allowed with data from gcp_firewall index&lt;/P&gt;

&lt;P&gt;Thoughts on what I need to add in the index to achieve that? example syntax below:&lt;/P&gt;

&lt;P&gt;index=gcp_firewall "data.jsonPayload.connection.src_ip"="*" &lt;BR /&gt;
| rename data.jsonPayload.connection.src_ip as Source &lt;BR /&gt;
| rename data.jsonPayload.connection.dest_ip as Destination &lt;BR /&gt;
| rename data.jsonPayload.connection.dest_port as Port &lt;BR /&gt;
| rename data.jsonPayload.instance.vm_name as Name &lt;BR /&gt;
| rename data.jsonPayload.rule_details.reference as firewall&lt;BR /&gt;
| dedup Source &lt;BR /&gt;
| table Source Name Destination Port firewall&lt;BR /&gt;
| stats count by firewall&lt;/P&gt;

&lt;P&gt;This returns EVERY firewall in GCP, when i really just want it to return ones that match the allowed firewall csv.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:03:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/find-only-values-in-2-index-files/m-p/478374#M82127</guid>
      <dc:creator>katmagee</dc:creator>
      <dc:date>2020-09-30T05:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: find only values in 2 index files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/find-only-values-in-2-index-files/m-p/478375#M82128</link>
      <description>&lt;P&gt;Assuming firewall field exists in the csv file. Here sub search with &lt;CODE&gt;inputlookup&lt;/CODE&gt; command filters index gcp_firewall with values in firewall.csv file.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=gcp_firewall "data.jsonPayload.connection.src_ip"="*" 
    [| inputlookup firewall.csv 
    | rename firewall as "data.jsonPayload.rule_details.reference" 
    | fields "data.jsonPayload.rule_details.reference"] 
| rename data.jsonPayload.connection.src_ip as Source 
| rename data.jsonPayload.connection.dest_ip as Destination 
| rename data.jsonPayload.connection.dest_port as Port 
| rename data.jsonPayload.instance.vm_name as Name 
| rename data.jsonPayload.rule_details.reference as firewall 
| stats latest(*) as * by Source 
| table Source Name Destination Port firewall 
| stats count by firewall
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Apr 2020 21:44:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/find-only-values-in-2-index-files/m-p/478375#M82128</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-04-20T21:44:23Z</dc:date>
    </item>
  </channel>
</rss>

