<?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 Can you help me figure out the best way to write the following query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452860#M128215</link>
    <description>&lt;P&gt;Kindly provide a better way to write the query in the below example.&lt;/P&gt;

&lt;P&gt;Also, one more thing I need help with is the hit count on destination port. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="cisco_asa_index" sourcetype="cisco:asa" src_zone=TP-OUTSIDE src_ip="*" src_port="*" dest_zone=DMZ dest_ip="*" dest_port="*"  
| iplocation src_ip 
| table src_zone,src_ip,Country,City,src_port,dest_zone,dest_ip,acl,dest_port,transport
| eval protocol=transport+"/"+dest_port
| fields - dest_port, transport
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Tue, 05 Feb 2019 01:08:29 GMT</pubDate>
    <dc:creator>sherrysafdar</dc:creator>
    <dc:date>2019-02-05T01:08:29Z</dc:date>
    <item>
      <title>Can you help me figure out the best way to write the following query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452860#M128215</link>
      <description>&lt;P&gt;Kindly provide a better way to write the query in the below example.&lt;/P&gt;

&lt;P&gt;Also, one more thing I need help with is the hit count on destination port. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="cisco_asa_index" sourcetype="cisco:asa" src_zone=TP-OUTSIDE src_ip="*" src_port="*" dest_zone=DMZ dest_ip="*" dest_port="*"  
| iplocation src_ip 
| table src_zone,src_ip,Country,City,src_port,dest_zone,dest_ip,acl,dest_port,transport
| eval protocol=transport+"/"+dest_port
| fields - dest_port, transport
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 01:08:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452860#M128215</guid>
      <dc:creator>sherrysafdar</dc:creator>
      <dc:date>2019-02-05T01:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out the best way to write the following query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452861#M128216</link>
      <description>&lt;P&gt;@sherrysafdar,&lt;/P&gt;

&lt;P&gt;Your search seems to be right except the &lt;CODE&gt;table&lt;/CODE&gt; which could be replaced by fields. However, it depends on whats the final result you want to achieve - probably a statistics with the data available.&lt;/P&gt;

&lt;P&gt;To get a count of destination port in each event, you may add &lt;CODE&gt;eventstats by dest_port&lt;/CODE&gt; to the search . &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="cisco_asa_index" sourcetype="cisco:asa" src_zone=TP-OUTSIDE src_ip="" src_port="" dest_zone=DMZ dest_ip="" dest_port="" 
| iplocation src_ip 
| table src_zone,src_ip,Country,City,src_port,dest_zone,dest_ip,acl,dest_port,transport
| eval protocol=transport+"/"+dest_port
| eventstats count by dest_port
| fields - transport
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Happy to assist further.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 04:50:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452861#M128216</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-02-05T04:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out the best way to write the following query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452862#M128217</link>
      <description>&lt;P&gt;you are searching for dest_port with blank value, and then doing event stats on it? will it give any result?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 05:29:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452862#M128217</guid>
      <dc:creator>jvishwak</dc:creator>
      <dc:date>2019-02-05T05:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out the best way to write the following query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452863#M128218</link>
      <description>&lt;P&gt;One suggestion, you can have table command in last, and fields command as early as in query.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 05:31:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452863#M128218</guid>
      <dc:creator>jvishwak</dc:creator>
      <dc:date>2019-02-05T05:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out the best way to write the following query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452864#M128219</link>
      <description>&lt;P&gt;Awesome, it worked like a charm, thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 17:15:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452864#M128219</guid>
      <dc:creator>sherrysafdar</dc:creator>
      <dc:date>2019-02-05T17:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out the best way to write the following query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452865#M128220</link>
      <description>&lt;P&gt;@jvishwak, Just FYI - its not empty in real search but it has been sanitized to remove potential confidential elements.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 03:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-the-best-way-to-write-the-following/m-p/452865#M128220</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-02-06T03:56:16Z</dc:date>
    </item>
  </channel>
</rss>

