<?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 Compiling stats for netstat output in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compiling-stats-for-netstat-output/m-p/160356#M45326</link>
    <description>&lt;P&gt;Is it possible to take raw netstat input like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 10.181.112.50:34656     10.157.88.10:11210      ESTABLISHED 1001       121024     6925/sync_gateway
tcp        0      0 10.181.112.50:38528     10.109.187.75:11210     TIME_WAIT   1001       121039     6925/sync_gateway
tcp        0      0 10.181.112.50:39648     10.109.176.116:11210    ESTABLISHED 1001       121056     6925/sync_gateway
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 10.181.112.50:34656     10.157.88.10:11210      ESTABLISHED 1001       121024     6925/sync_gateway
tcp        0      0 10.181.112.50:38528     10.109.187.75:11210     TIME_WAIT   1001       121039     6925/sync_gateway
tcp        0      0 10.181.112.50:39648     10.109.176.116:11210    TIME_WAIT   1001       121056     6925/sync_gateway
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and for each "reading" (separated by the Proto Recv-Q header) compute stats like:&lt;/P&gt;

&lt;H2&gt;Reading 1&lt;/H2&gt;

&lt;P&gt;ESTABLISHED: 2 &lt;BR /&gt;
  TIME_WAIT: 1&lt;/P&gt;

&lt;H2&gt;Reading 2&lt;/H2&gt;

&lt;P&gt;ESTABLISHED: 1&lt;BR /&gt;
  TIME_WAIT: 2&lt;/P&gt;

&lt;P&gt;If it would make it easier to put each netstat reading into it's own file, that would work too.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jun 2015 00:16:12 GMT</pubDate>
    <dc:creator>tleyden</dc:creator>
    <dc:date>2015-06-18T00:16:12Z</dc:date>
    <item>
      <title>Compiling stats for netstat output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compiling-stats-for-netstat-output/m-p/160356#M45326</link>
      <description>&lt;P&gt;Is it possible to take raw netstat input like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 10.181.112.50:34656     10.157.88.10:11210      ESTABLISHED 1001       121024     6925/sync_gateway
tcp        0      0 10.181.112.50:38528     10.109.187.75:11210     TIME_WAIT   1001       121039     6925/sync_gateway
tcp        0      0 10.181.112.50:39648     10.109.176.116:11210    ESTABLISHED 1001       121056     6925/sync_gateway
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 10.181.112.50:34656     10.157.88.10:11210      ESTABLISHED 1001       121024     6925/sync_gateway
tcp        0      0 10.181.112.50:38528     10.109.187.75:11210     TIME_WAIT   1001       121039     6925/sync_gateway
tcp        0      0 10.181.112.50:39648     10.109.176.116:11210    TIME_WAIT   1001       121056     6925/sync_gateway
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and for each "reading" (separated by the Proto Recv-Q header) compute stats like:&lt;/P&gt;

&lt;H2&gt;Reading 1&lt;/H2&gt;

&lt;P&gt;ESTABLISHED: 2 &lt;BR /&gt;
  TIME_WAIT: 1&lt;/P&gt;

&lt;H2&gt;Reading 2&lt;/H2&gt;

&lt;P&gt;ESTABLISHED: 1&lt;BR /&gt;
  TIME_WAIT: 2&lt;/P&gt;

&lt;P&gt;If it would make it easier to put each netstat reading into it's own file, that would work too.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2015 00:16:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compiling-stats-for-netstat-output/m-p/160356#M45326</guid>
      <dc:creator>tleyden</dc:creator>
      <dc:date>2015-06-18T00:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling stats for netstat output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compiling-stats-for-netstat-output/m-p/160357#M45327</link>
      <description>&lt;P&gt;I am assuming that each "reading" is a separate event.  If so, you need the &lt;CODE&gt;multikv&lt;/CODE&gt; command and this should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | streamstats current=t count AS reading | multikv | stats count by reading State
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 20 Jun 2015 14:49:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compiling-stats-for-netstat-output/m-p/160357#M45327</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-20T14:49:03Z</dc:date>
    </item>
  </channel>
</rss>

