<?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 Line Break  props.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497192#M84777</link>
    <description>&lt;P&gt;Any luck? &lt;/P&gt;</description>
    <pubDate>Wed, 29 Jan 2020 15:56:32 GMT</pubDate>
    <dc:creator>oscar84x</dc:creator>
    <dc:date>2020-01-29T15:56:32Z</dc:date>
    <item>
      <title>Regex for Line Break  props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497185#M84770</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;

&lt;P&gt;Any Regex geniuses that can help line break the below logs.&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/8299i9377ADEB71E91B43/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;Ideally remove the text in the red and line break where highlighted yellow&lt;/P&gt;

&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 15:07:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497185#M84770</guid>
      <dc:creator>nathanluke86</dc:creator>
      <dc:date>2020-01-28T15:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Line Break  props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497186#M84771</link>
      <description>&lt;P&gt;Is it possible for you to provide an actual sample of the data? Delete or replace any user data.&lt;BR /&gt;
It's difficult to figure out without knowing where there are blank spaces or carriage returns.&lt;/P&gt;

&lt;P&gt;The settings you're looking to use in props are &lt;STRONG&gt;LINE_BREAKER&lt;/STRONG&gt; and &lt;STRONG&gt;SEDCMD&lt;/STRONG&gt;. Something like:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;LINE_BRAKER = ([{}\,\s]+)"allowed"&lt;/STRONG&gt;  &amp;lt;-- this would start each event with "allowed" and get rid of the characters between &lt;STRONG&gt;()&lt;/STRONG&gt;&lt;BR /&gt;
&lt;STRONG&gt;SEDCMD-null = s/{|}|"netflows":\s+[//g&lt;/STRONG&gt; &amp;lt;-- This will get rid of the header line as well as any lingering single curly braces&lt;/P&gt;

&lt;P&gt;You can play around with the REGEX and those settings and find what works for your desired outcome. But you could share some actual data structure and we can refine it.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 15:36:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497186#M84771</guid>
      <dc:creator>oscar84x</dc:creator>
      <dc:date>2020-01-28T15:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Line Break  props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497187#M84772</link>
      <description>&lt;P&gt;Try these props.conf settings.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mysourcetype]
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)\s+{
SEDCMD-netflows = s/{\s+"netflows": \[//
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;P.S.  Posting text instead of an image makes it easier for us to test regular expressions with your data.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 15:37:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497187#M84772</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-01-28T15:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Line Break  props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497188#M84773</link>
      <description>&lt;P&gt;{&lt;BR /&gt;
  "netflows": [&lt;BR /&gt;
    {&lt;BR /&gt;
      "allowed_domain": [&lt;BR /&gt;
        "xxxxxxxxxxxx"&lt;BR /&gt;
      ], &lt;BR /&gt;
      "create_time": "2020-01-28T14:35:01.919766", &lt;BR /&gt;
      "direction": "DIRECTION_REMOTE_INITIATED", &lt;BR /&gt;
      "end_time": "2020-01-28T14:42:14.431033", &lt;BR /&gt;
      "endpoint_platform": "xxxxx", &lt;BR /&gt;
      "event_hostname": "xxxxxxx", &lt;BR /&gt;
      "id": {&lt;BR /&gt;
        "fragment_id": 7456039343514739067, &lt;BR /&gt;
        "host_id": "xxxxxxxxxxx", &lt;BR /&gt;
        "instance_id": "xxxxxxxxxxxxx", &lt;BR /&gt;
        "timestamp": "2020-01-28T15:29:50.785488"&lt;BR /&gt;
      }, &lt;BR /&gt;
      "local_ip": "xxxxxxx", &lt;BR /&gt;
      "local_port": xxxxx, &lt;BR /&gt;
      "process_id": {&lt;BR /&gt;
        "host_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", &lt;BR /&gt;
        "pid": 1748, &lt;BR /&gt;
        "time_window": 13224155566&lt;BR /&gt;
      }, &lt;BR /&gt;
      "protocol": "PROTOCOL_UDP", &lt;BR /&gt;
      "remote_ip": "xxxxxxxx", &lt;BR /&gt;
      "remote_port": xxxx, &lt;BR /&gt;
      "rx_bytes": 44, &lt;BR /&gt;
      "unique_timestamp": "2020-01-28T15:29:50.785488-f5ab3ba0c8c13db2"&lt;BR /&gt;
    }, &lt;BR /&gt;
    {&lt;BR /&gt;
      "allowed_domain": [&lt;BR /&gt;
        "28fea4ba"&lt;BR /&gt;
      ], &lt;BR /&gt;
      "create_time": "2020-01-28T14:34:57.648822", &lt;BR /&gt;
      "direction": "DIRECTION_REMOTE_INITIATED", &lt;BR /&gt;
      "end_time": "2020-01-28T14:42:11.299711", &lt;BR /&gt;
      "endpoint_platform": "xxxxxxxxx", &lt;BR /&gt;
      "event_hostname": "xxxx", &lt;BR /&gt;
      "id": {&lt;BR /&gt;
        "fragment_id": xxxxxxxxxxxxxxx, &lt;BR /&gt;
        "host_id": "xxxxxxxxxxxxxxxxxxxxxx", &lt;BR /&gt;
        "instance_id": "xxxxxxxxxxx", &lt;BR /&gt;
        "timestamp": "2020-01-28T15:29:50.785295"&lt;BR /&gt;
      }, &lt;BR /&gt;
      "local_ip": "xxxxxxxxxx", &lt;BR /&gt;
      "local_port": xxxxxxx, &lt;BR /&gt;
      "process_id": {&lt;BR /&gt;
        "host_id": "xxxxxxxxxxxxxxxxxxxxxx", &lt;BR /&gt;
        "pid": xxxxx0, &lt;BR /&gt;
        "time_window": 13224155688&lt;BR /&gt;
      }, &lt;BR /&gt;
      "protocol": "PROTOCOL_UDP", &lt;BR /&gt;
      "remote_ip": "xxxxxxxxxx", &lt;BR /&gt;
      "remote_port": xxxxxxxxxxxxxxx, &lt;BR /&gt;
      "rx_bytes": 696, &lt;BR /&gt;
      "unique_timestamp": "2020-01-28T15:29:50.x"&lt;BR /&gt;
    }, &lt;BR /&gt;
    {&lt;BR /&gt;
      "allowed_domain": [&lt;BR /&gt;
        "x"&lt;BR /&gt;
      ], &lt;BR /&gt;
      "create_time": "2020-01-28T14:34:59.348932", &lt;BR /&gt;
      "direction": "DIRECTION_REMOTE_INITIATED", &lt;BR /&gt;
      "end_time": "2020-01-28T14:42:10.980602", &lt;BR /&gt;
      "endpoint_platform": "x, &lt;BR /&gt;
      "event_hostname": "x", &lt;BR /&gt;
      "id": {&lt;BR /&gt;
        "fragment_id": x, &lt;BR /&gt;
        "host_id": "2xxxa1", &lt;BR /&gt;
        "instance_id": "dxxxx", &lt;BR /&gt;
        "timestamp": "2020-01-28T15:29:50.783380"&lt;BR /&gt;
      }, &lt;BR /&gt;
      "local_ip": "fx3", &lt;BR /&gt;
      "local_port": x, &lt;BR /&gt;
      "process_id": {&lt;BR /&gt;
        "host_id": "x", &lt;BR /&gt;
        "pid": 1x8, &lt;BR /&gt;
        "time_window": 13224155566&lt;BR /&gt;
      }, &lt;BR /&gt;
      "protocol": "PROTOCOL_UDP", &lt;BR /&gt;
      "remote_ip": "fxxxxxxx", &lt;BR /&gt;
      "remote_port": x, &lt;BR /&gt;
      "rx_bytes": 44, &lt;BR /&gt;
      "unique_timestamp": "2020-01-28T15:29:50.783380-997aae15b7991f4a"&lt;BR /&gt;
    }, &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:56:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497188#M84773</guid>
      <dc:creator>nathanluke86</dc:creator>
      <dc:date>2020-09-30T03:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Line Break  props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497189#M84774</link>
      <description>&lt;P&gt;TIA much appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 16:00:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497189#M84774</guid>
      <dc:creator>nathanluke86</dc:creator>
      <dc:date>2020-01-28T16:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Line Break  props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497190#M84775</link>
      <description>&lt;P&gt;TIA will try both suggestions. I have added txt above&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 16:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497190#M84775</guid>
      <dc:creator>nathanluke86</dc:creator>
      <dc:date>2020-01-28T16:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Line Break  props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497191#M84776</link>
      <description>&lt;P&gt;Great. From what you shared I got 3 events starting with &lt;STRONG&gt;"allowed_domain"&lt;/STRONG&gt; and ending with &lt;STRONG&gt;"unique_timestamp"&lt;/STRONG&gt;. Also got rid of the header. Try this:&lt;/P&gt;

&lt;P&gt;[your_sourcetype]&lt;BR /&gt;
SHOULD_LINEMERGE=false&lt;BR /&gt;
LINE_BREAKER=([{}\,\s]+)"allowed&lt;BR /&gt;
NO_BINARY_CHECK=true&lt;BR /&gt;
SEDCMD-null=s/^{\s+|"netflows": [//g&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:56:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497191#M84776</guid>
      <dc:creator>oscar84x</dc:creator>
      <dc:date>2020-09-30T03:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Line Break  props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497192#M84777</link>
      <description>&lt;P&gt;Any luck? &lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 15:56:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497192#M84777</guid>
      <dc:creator>oscar84x</dc:creator>
      <dc:date>2020-01-29T15:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Line Break  props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497193#M84778</link>
      <description>&lt;P&gt;Thanks @oscar84x &lt;/P&gt;

&lt;P&gt;I am having issues with the Splunk Addon builder app doing a rest API call. When I solve this issue I can test this properly and let you know.&lt;/P&gt;

&lt;P&gt;Thanks for the help so far.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 14:29:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497193#M84778</guid>
      <dc:creator>nathanluke86</dc:creator>
      <dc:date>2020-01-30T14:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Line Break  props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497194#M84779</link>
      <description>&lt;P&gt;No problem. If it works please don't forget to accept it as an answer, thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 15:50:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Regex-for-Line-Break-props-conf/m-p/497194#M84779</guid>
      <dc:creator>oscar84x</dc:creator>
      <dc:date>2020-01-31T15:50:41Z</dc:date>
    </item>
  </channel>
</rss>

