<?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: SPLUNK Search derived from Stream app produces strange result... in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400324#M115994</link>
    <description>&lt;P&gt;I've now this search: &lt;/P&gt;

&lt;P&gt;index=* source="stream:*" source="stream:fortistream" &lt;BR /&gt;
 |table timestamp, src_ip, dest_ip, ,dest_port, sum(bytes_in), sum(bytes_out)&lt;/P&gt;

&lt;P&gt;But how do I make sure the values of scr_ip and dest_ip belong together within the same data flow? &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 21:42:00 GMT</pubDate>
    <dc:creator>heskez</dc:creator>
    <dc:date>2020-09-29T21:42:00Z</dc:date>
    <item>
      <title>SPLUNK Search derived from Stream app produces strange result...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400318#M115988</link>
      <description>&lt;P&gt;Hi there, when I run this search: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* source=stream:Splunk_IP | rex field=src_ip "(?&amp;lt;src1&amp;gt;.*)\.(?&amp;lt;src2&amp;gt;.*)\.(?&amp;lt;src3&amp;gt;.*)\.(?&amp;lt;src4&amp;gt;.*)" | where src1 NOT null | rex field=dest_ip "(?&amp;lt;dest1&amp;gt;.*)\.(?&amp;lt;dest2&amp;gt;.*)\.(?&amp;lt;dest3&amp;gt;.*)\.(?&amp;lt;dest4&amp;gt;.*)" | where dest1 NOT null | eval source_ip=round(src1+exact(src2*.001), 3) | eval destination_ip=round(dest1+exact(dest2*.001), 3) | eventstats sum(sum(bytes)) as bytes by source_ip, destination_ip | stats latest(source_ip), latest(destination_ip), sum(count) by bytes | rename latest(source_ip) as "Source IP", latest(destination_ip) as "Destination IP", sum(count) as "Flows", bytes as "Bytes", sourcetype as "Sourcetype"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It produces this result: &lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5851i6326B262A27C8ABD/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;As you'll notice the other half of source and destination ipaddresses are missing.&lt;/P&gt;

&lt;P&gt;Is this: ????&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Because the flow data doesn't arrive properly in SPLUNK&lt;/LI&gt;
&lt;LI&gt;The stream app needs more configuring&lt;/LI&gt;
&lt;LI&gt;Search syntax is wrong&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I'd highly appreciate an answer on this. &lt;BR /&gt;
Thanks in advance! &lt;/P&gt;

&lt;P&gt;Erik&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 08:47:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400318#M115988</guid>
      <dc:creator>heskez</dc:creator>
      <dc:date>2018-09-26T08:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK Search derived from Stream app produces strange result...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400319#M115989</link>
      <description>&lt;P&gt;This is happening because you are using round function. can you try to remove it?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 09:31:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400319#M115989</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-09-26T09:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK Search derived from Stream app produces strange result...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400320#M115990</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;

&lt;P&gt;In these commands: &lt;BR /&gt;
&lt;CODE&gt;| eval source_ip=round(src1+exact(src2*.001), 3) | eval destination_ip=round(dest1+exact(dest2*.001), 3)&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;
you try to concatenate only two parts of IP (src1 and src2). No wonder, that half of IP is missing. Substitute these evals with: &lt;BR /&gt;
&lt;CODE&gt;| eval source_ip = src1 + "." + src2  +"." + src3 + "." + src4 | eval destination_ip = dest1  + "." + dest2 + "." + dest3 + "." + dest4&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;By the way, are you sure you need such conversion? I'm guessing, &lt;CODE&gt;src_ip&lt;/CODE&gt; and &lt;CODE&gt;dest_ip&lt;/CODE&gt; contains the whole and correct IP addresses, and you can use them instead of &lt;CODE&gt;source_ip&lt;/CODE&gt; and &lt;CODE&gt;destination_ip&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 10:13:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400320#M115990</guid>
      <dc:creator>nryabykh</dc:creator>
      <dc:date>2018-09-26T10:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK Search derived from Stream app produces strange result...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400321#M115991</link>
      <description>&lt;P&gt;Thanks, I wonder why they even use the round function on an ipaddress!? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Anyway, if I remove it I mess up the syntax completely..&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 10:47:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400321#M115991</guid>
      <dc:creator>heskez</dc:creator>
      <dc:date>2018-09-26T10:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK Search derived from Stream app produces strange result...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400322#M115992</link>
      <description>&lt;P&gt;Thanks! When I convert the syntax like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* source=stream:Splunk_IP | rex field=src_ip "(?&amp;lt;src1&amp;gt;.*)\.(?&amp;lt;src2&amp;gt;.*)\.(?&amp;lt;src3&amp;gt;.*)\.(?&amp;lt;src4&amp;gt;.*)" | where src1 NOT null | rex field=dest_ip "(?&amp;lt;dest1&amp;gt;.*)\.(?&amp;lt;dest2&amp;gt;.*)\.(?&amp;lt;dest3&amp;gt;.*)\.(?&amp;lt;dest4&amp;gt;.*)" | where dest1 NOT null | | eval source_ip = src1 + "." + src2 +"." + src3 + "." + src4 | eval destination_ip = dest1 + "." + dest2 + "." + dest3 + "." + dest4 | eventstats sum(sum(bytes)) as bytes by source_ip, destination_ip | stats latest(source_ip), latest(destination_ip), sum(count) by bytes | rename latest(source_ip) as "Source IP", latest(destination_ip) as "Destination IP", sum(count) as "Flows", bytes as "Bytes", sourcetype as "Sourcetype"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It produces an error message: Error in 'SearchParser': Missing a search command before '|'. Error at position '235' of search query 'search index=* source=stream:Splunk_IP | rex field...{snipped} {errorcontext = OT null | | eval sour}'.&lt;/P&gt;

&lt;P&gt;You'd say you don't need the source_ip, however it's part of the data model. If I try search on src_ip I don't get any data.. Or.. I'm doing wrong search, what would be the search syntax then?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:26:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400322#M115992</guid>
      <dc:creator>heskez</dc:creator>
      <dc:date>2020-09-29T21:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK Search derived from Stream app produces strange result...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400323#M115993</link>
      <description>&lt;P&gt;Basically this will work for me: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* source="stream:*" source="stream:fortistream" 
|table timestamp, src_ip, dest_ip, ,dest_port, sum(bytes_in), sum(bytes_out)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So what do I need this crazy search that comes with the stream app datamodel for then?&lt;BR /&gt;
Why did they set it up like this?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 21:53:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400323#M115993</guid>
      <dc:creator>heskez</dc:creator>
      <dc:date>2018-09-26T21:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK Search derived from Stream app produces strange result...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400324#M115994</link>
      <description>&lt;P&gt;I've now this search: &lt;/P&gt;

&lt;P&gt;index=* source="stream:*" source="stream:fortistream" &lt;BR /&gt;
 |table timestamp, src_ip, dest_ip, ,dest_port, sum(bytes_in), sum(bytes_out)&lt;/P&gt;

&lt;P&gt;But how do I make sure the values of scr_ip and dest_ip belong together within the same data flow? &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:42:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400324#M115994</guid>
      <dc:creator>heskez</dc:creator>
      <dc:date>2020-09-29T21:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK Search derived from Stream app produces strange result...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400325#M115995</link>
      <description>&lt;P&gt;Anyone?&lt;BR /&gt;
WIth advice?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 22:39:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-Search-derived-from-Stream-app-produces-strange-result/m-p/400325#M115995</guid>
      <dc:creator>heskez</dc:creator>
      <dc:date>2018-10-17T22:39:20Z</dc:date>
    </item>
  </channel>
</rss>

