<?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: Regex for F5 BIG IP ASM logs in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384877#M112404</link>
    <description>&lt;P&gt;Thx for the rex&lt;/P&gt;

&lt;P&gt;When I apply it, I'm seeing values other than the three listed:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;May 21 16:24:21 &amp;lt;hostname&amp;gt; ASM:f5_asm=dest-F5-ASM,attack_type=
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and some other variations of that&lt;/P&gt;</description>
    <pubDate>Wed, 22 May 2019 17:39:40 GMT</pubDate>
    <dc:creator>jwalzerpitt</dc:creator>
    <dc:date>2019-05-22T17:39:40Z</dc:date>
    <item>
      <title>Regex for F5 BIG IP ASM logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384874#M112401</link>
      <description>&lt;P&gt;There is a field - req_status - for F5 Big IP ASM logs and right now when I view the values, I expect to see three:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Passed&lt;/LI&gt;
&lt;LI&gt;Blocked&lt;/LI&gt;
&lt;LI&gt;Alerted&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;However, when I view the values, I am seeing values that are truncated like as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"pa
"p
"pas
"pass
"passe
"
"passed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is a snippet of the log (verbiage before and after the snippet):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.....req_status="passed",resp="Logging rate limit reached".....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried using &lt;CODE&gt;,req_status=(\"\w+)",&lt;/CODE&gt; for my regex and it looks clean on regex101.com, but not Splunk.&lt;/P&gt;

&lt;P&gt;Any suggestions to clean up the regex would be greatly appreciated&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 15:35:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384874#M112401</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2019-05-22T15:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for F5 BIG IP ASM logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384875#M112402</link>
      <description>&lt;P&gt;Please try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex "req_status=\"(?&amp;lt;req_status&amp;gt;[^\"]+)\""
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 May 2019 16:00:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384875#M112402</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-22T16:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for F5 BIG IP ASM logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384876#M112403</link>
      <description>&lt;P&gt;Try below regex .&lt;/P&gt;

&lt;P&gt;req_status=\"(?\w+[^\"]),Try below regex and let me know .&lt;/P&gt;

&lt;P&gt;req_status=\"(?[^\"]+[^\"])&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 16:21:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384876#M112403</guid>
      <dc:creator>abhijeetbandre</dc:creator>
      <dc:date>2019-05-22T16:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for F5 BIG IP ASM logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384877#M112404</link>
      <description>&lt;P&gt;Thx for the rex&lt;/P&gt;

&lt;P&gt;When I apply it, I'm seeing values other than the three listed:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;May 21 16:24:21 &amp;lt;hostname&amp;gt; ASM:f5_asm=dest-F5-ASM,attack_type=
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and some other variations of that&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 17:39:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384877#M112404</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2019-05-22T17:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for F5 BIG IP ASM logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384878#M112405</link>
      <description>&lt;P&gt;Thx for the two rexes.&lt;/P&gt;

&lt;P&gt;Applying the first rex, I get the truncated values&lt;/P&gt;

&lt;P&gt;Applying the second rex, I get values other than the three I'm looking for:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;May 21 16:24:21 &amp;lt;hostname&amp;gt; ASM:f5_asm=dest-F5-ASM,attack_type=
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 17:41:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384878#M112405</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2019-05-22T17:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for F5 BIG IP ASM logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384879#M112406</link>
      <description>&lt;P&gt;please give the whole event as a sample, so we can write the regex for you&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 21:24:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384879#M112406</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-22T21:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for F5 BIG IP ASM logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384880#M112407</link>
      <description>&lt;P&gt;Please post samples of the full raw log event (sanitized) as well as the current configuration (props.conf probably) for parsing this field.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 21:26:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384880#M112407</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2019-05-22T21:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for F5 BIG IP ASM logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384881#M112408</link>
      <description>&lt;P&gt;Hi @jwalzerpitt,&lt;/P&gt;

&lt;P&gt;The problem is not in the regex but it's with the &lt;CODE&gt;KV_MODE&lt;/CODE&gt; in &lt;CODE&gt;props.conf&lt;/CODE&gt; of your sourcetype. It's trying to automatically extract the field and sometimes ends up breaking it if the event if truncated.&lt;/P&gt;

&lt;P&gt;Go into your &lt;CODE&gt;props.conf&lt;/CODE&gt; and change the &lt;CODE&gt;KV_MODE&lt;/CODE&gt; to &lt;CODE&gt;none&lt;/CODE&gt; then restart your search head and then try your regex again, should work like a charm.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 06:28:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-F5-BIG-IP-ASM-logs/m-p/384881#M112408</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-23T06:28:08Z</dc:date>
    </item>
  </channel>
</rss>

