<?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 rex fields from *nix netstat output in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/rex-fields-from-nix-netstat-output/m-p/162822#M186016</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to graph the "packet receive error" value over time for one of our servers. This is a value returned from the *nix netstat command. The search query I am using is:&lt;/P&gt;

&lt;P&gt;index=os host=ourServerName source=netstat packet | rex "(?&lt;PACKET_ERRORS&gt;.*)\spacket receive errors" | timechart last(packet_errors)&lt;/PACKET_ERRORS&gt;&lt;/P&gt;

&lt;P&gt;No values are showing up in the results chart or in the packet_errors column of the results table. The Events List of the result set shows this:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;... 336 lines omitted ...&lt;BR /&gt;
81551449019  packets  received&lt;BR /&gt;&lt;BR /&gt;
117791511  packets  to  unknown port received.&lt;BR /&gt;
72260802  packet  receive  errors&lt;BR /&gt;&lt;BR /&gt;
47604771227  packets    sent&lt;BR /&gt;&lt;BR /&gt;
... 12 lines omitted ...&lt;BR /&gt;
3081684486  packets  directly  queued  to recvmsg&lt;BR /&gt;
1075841087  packets  directly  received   from  backlog&lt;BR /&gt;
1579575698098  packets  directly  received  from   prequeue&lt;BR /&gt;
811125365  packets  header  predicted&lt;BR /&gt;&lt;BR /&gt;
2953985762  packets  header  predicted and  directly&lt;BR /&gt;
... 2 lines omitted ...&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;I tried using the Extract Fields feature but Splunk is telling me that no regex could be learned when I tried submitting the Extract Fields form with an example value of "72260802". I've been trying a variety of different rex'es but none have worked. The value I am trying to extract in the Event List example above is "72260802".&lt;/P&gt;

&lt;P&gt;Anyone have any tips or tricks to extracting this value?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Chris&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2013 19:10:13 GMT</pubDate>
    <dc:creator>bearlmax</dc:creator>
    <dc:date>2013-12-02T19:10:13Z</dc:date>
    <item>
      <title>rex fields from *nix netstat output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-fields-from-nix-netstat-output/m-p/162822#M186016</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to graph the "packet receive error" value over time for one of our servers. This is a value returned from the *nix netstat command. The search query I am using is:&lt;/P&gt;

&lt;P&gt;index=os host=ourServerName source=netstat packet | rex "(?&lt;PACKET_ERRORS&gt;.*)\spacket receive errors" | timechart last(packet_errors)&lt;/PACKET_ERRORS&gt;&lt;/P&gt;

&lt;P&gt;No values are showing up in the results chart or in the packet_errors column of the results table. The Events List of the result set shows this:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;... 336 lines omitted ...&lt;BR /&gt;
81551449019  packets  received&lt;BR /&gt;&lt;BR /&gt;
117791511  packets  to  unknown port received.&lt;BR /&gt;
72260802  packet  receive  errors&lt;BR /&gt;&lt;BR /&gt;
47604771227  packets    sent&lt;BR /&gt;&lt;BR /&gt;
... 12 lines omitted ...&lt;BR /&gt;
3081684486  packets  directly  queued  to recvmsg&lt;BR /&gt;
1075841087  packets  directly  received   from  backlog&lt;BR /&gt;
1579575698098  packets  directly  received  from   prequeue&lt;BR /&gt;
811125365  packets  header  predicted&lt;BR /&gt;&lt;BR /&gt;
2953985762  packets  header  predicted and  directly&lt;BR /&gt;
... 2 lines omitted ...&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;I tried using the Extract Fields feature but Splunk is telling me that no regex could be learned when I tried submitting the Extract Fields form with an example value of "72260802". I've been trying a variety of different rex'es but none have worked. The value I am trying to extract in the Event List example above is "72260802".&lt;/P&gt;

&lt;P&gt;Anyone have any tips or tricks to extracting this value?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Chris&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2013 19:10:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-fields-from-nix-netstat-output/m-p/162822#M186016</guid>
      <dc:creator>bearlmax</dc:creator>
      <dc:date>2013-12-02T19:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: rex fields from *nix netstat output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-fields-from-nix-netstat-output/m-p/162823#M186017</link>
      <description>&lt;P&gt;Something like this should work, not much different from what you had:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "(?&amp;lt;packet_errors&amp;gt;\d+)\s+packet\s+receive\s+errors"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Dec 2013 19:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-fields-from-nix-netstat-output/m-p/162823#M186017</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-12-02T19:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: rex fields from *nix netstat output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-fields-from-nix-netstat-output/m-p/162824#M186018</link>
      <description>&lt;P&gt;Thank you. You got me on the right track. Looks like there are two spaces in between the words in the phrase "packet  receive  errors". So this search works for me:&lt;/P&gt;

&lt;P&gt;index=os host=myServerName source=netstat packet | rex "(?&lt;PACKET_ERRORS&gt;\d+)\s\spacket\s\sreceive\s\serrors" | timechart last(packet_errors)&lt;/PACKET_ERRORS&gt;&lt;/P&gt;

&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2013 20:48:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-fields-from-nix-netstat-output/m-p/162824#M186018</guid>
      <dc:creator>bearlmax</dc:creator>
      <dc:date>2013-12-02T20:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: rex fields from *nix netstat output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-fields-from-nix-netstat-output/m-p/162825#M186019</link>
      <description>&lt;P&gt;yer welcome.&lt;/P&gt;

&lt;P&gt;For one or more in regex you can use a plus sign.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2013 20:51:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-fields-from-nix-netstat-output/m-p/162825#M186019</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-12-02T20:51:52Z</dc:date>
    </item>
  </channel>
</rss>

