<?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 Query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/95314#M24606</link>
    <description>&lt;P&gt;As long as you have the line breaking correct for the events in Splunk than a regex like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?&amp;lt;=bandwidth\s)\d+(?=\s)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to replace what IFX is coming up with should work.  Just go into the config file and change it directly or if you've already deleted it, replace it in the IFX when you create the extraction.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jan 2013 19:01:25 GMT</pubDate>
    <dc:creator>sdaniels</dc:creator>
    <dc:date>2013-01-22T19:01:25Z</dc:date>
    <item>
      <title>Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/95313#M24605</link>
      <description>&lt;P&gt;I'm trying to extract a single field from a log and perform some statistical calculations using stats.&lt;/P&gt;

&lt;P&gt;The log entries I have look like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"Jan 22 16:43:48 10.164.93.7 10.164.93.7 local2 warn rpd[1106]: RPD_MPLS_PATH_BANDWIDTH_CHANGE: MPLS path  (lsp B.R2.CHI-1) bandwidth changed, path bandwidth 81659056 bps","2013-01-22T11:43:48.000-0500",,16,22,43,january,48,tuesday,2013,local,"nix-all-logs",local2,"log.itgh.net",,"syslog_prod",1,22,"C-NET","10.164.93.7","10.164.93.7","R1.BB-FO.BRN1",Jan,"16:43:48","RPD_MPLS_PATH_BANDWIDTH_CHANGE: MPLS path  (lsp R1.CHI2-1) bandwidth changed, path bandwidth 81659056 bps",,"__::_..._...___[]:_:____(_-.-.-)__,____",warn,"/app/syslog/10.164.93.7/10.164.93.7.log","syslog_vrsn","splunk6",,16,7
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The query I'm using is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=syslog_data bandwidth | extract pairdelim="bandwidth", kvdelim="bps", auto=f
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;does not extract the bandwidth number, in the above example, I just want to extract the number 81659056&lt;/P&gt;

&lt;P&gt;I can user the IFX to extract the field, but then the extracted field looks like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    1   0.877193
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;5   RPD_MPLS_PATH_BANDWIDTH_CHANGE: MPLS path (lsp R6.NYC.LAX3-1) bandwidth changed, path bandwidth 75085360 bps&lt;/P&gt;

&lt;P&gt;What is the best way to extract just the bandwidth from the entry?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:09:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/95313#M24605</guid>
      <dc:creator>DTERM</dc:creator>
      <dc:date>2020-09-28T13:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/95314#M24606</link>
      <description>&lt;P&gt;As long as you have the line breaking correct for the events in Splunk than a regex like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?&amp;lt;=bandwidth\s)\d+(?=\s)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to replace what IFX is coming up with should work.  Just go into the config file and change it directly or if you've already deleted it, replace it in the IFX when you create the extraction.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2013 19:01:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/95314#M24606</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2013-01-22T19:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/95315#M24607</link>
      <description>&lt;P&gt;Is there a reason why you are using extract? You could just use rex if the bandwidth is the only field you need:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=syslog_data bandwidth | rex "bandwidth\s(?&amp;lt;my_bandwidth&amp;gt;\d+)\sbps"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2013 19:06:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/95315#M24607</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2013-01-22T19:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/95316#M24608</link>
      <description>&lt;P&gt;Perfect, gotta learn SPLUNK regex!  Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2013 19:27:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/95316#M24608</guid>
      <dc:creator>DTERM</dc:creator>
      <dc:date>2013-01-22T19:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/95317#M24609</link>
      <description>&lt;P&gt;You're welcome&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2013 21:39:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/95317#M24609</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2013-01-22T21:39:55Z</dc:date>
    </item>
  </channel>
</rss>

