<?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: Using DELIMS with a string instead of single character in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321313#M59924</link>
    <description>&lt;P&gt;Excellent!.  @restevan - please mark answer as accepted.&lt;/P&gt;</description>
    <pubDate>Tue, 30 May 2017 13:33:32 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-05-30T13:33:32Z</dc:date>
    <item>
      <title>Using DELIMS with a string instead of single character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321308#M59919</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm forwarding from an proxy logs using NX-log and nxlog is using string "#011" to separate fields, like that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;May 29 20:28:55 PROXY - 10.147.23.21#011anonymous#011Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36#0112017-05-29#01118:28:44#011WBCNGTY02#011-#011login.splunk.com#01154.191.103.192#011443#0110#0117408#0112032#011SSL-tunnel#011-#011login.splunk.com:443#011-#011Inet#0110#011Navigate#011Req ID: 05543040; Compression: client=No, server=No, compress rate=0% decompress rate=0%#011Internal#011Internal#0110x8#011Allowed#011-#011-#011-#011-#011Allowed#011Malware Inspection Disabled for the Matching Policy Rule#011Unknown#011-#0110#011-#0110#011-#011-#011Feature disabled#011Web Proxy#011login.splunk.com#0119958#015
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've created in my transforms.conf the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  DELIMS = "\#"
    FIELDS = "c-ip","cs-username","c-agent","date","time","s-computername","cs-referred","r-host","r-ip","r-port","time-taken","sc-bytes","cs-bytes","cs-protocol","s-operation","cs-uri","cs-mime-type","s-object-source","sc-status","rule","FilterInfo","cs-network","sc-network","error-info","action","AuthenticationServer","NIS_scan_result","NIS_signature","ThreatName","MalwareInspectionAction","MalwareInspectionResult","UrlCategory","MalwareInspectionContentDeliveryMethod","MalwareInspectionDuration","MalwareInspectionThreatLevel","internal-service-info","NIS_application_protocol","NAT_address","UrlCategorizationReason","SessionType","UrlDestHost","s-port"        
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And it works but it's not ok because every field value has at its begining the string "011".&lt;/P&gt;

&lt;P&gt;Is there a way to specify a field delimiter that is not a single character but a string?&lt;BR /&gt;
I've tried the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DELIMS = "\#011"
FIELDS = "c-ip","cs-username","c-agent","date","time","s-computername","cs-referred","r-host","r-ip","r-port","time-taken","sc-bytes","cs-bytes","cs-protocol","s-operation","cs-uri","cs-mime-type","s-object-source","sc-status","rule","FilterInfo","cs-network","sc-network","error-info","action","AuthenticationServer","NIS_scan_result","NIS_signature","ThreatName","MalwareInspectionAction","MalwareInspectionResult","UrlCategory","MalwareInspectionContentDeliveryMethod","MalwareInspectionDuration","MalwareInspectionThreatLevel","internal-service-info","NIS_application_protocol","NAT_address","UrlCategorizationReason","SessionType","UrlDestHost","s-port"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But that seems not to work.&lt;BR /&gt;
May be there is another way of doing what I need.&lt;BR /&gt;
Any help?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2017 18:37:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321308#M59919</guid>
      <dc:creator>restevan</dc:creator>
      <dc:date>2017-05-29T18:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using DELIMS with a string instead of single character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321309#M59920</link>
      <description>&lt;P&gt;I would change the #011 to pipes with sedcmd in props.  &lt;/P&gt;

&lt;P&gt;SEDCMD-fixdelims= s/#011/|/g&lt;/P&gt;

&lt;P&gt;Then I would use pipes as the delims.&lt;/P&gt;

&lt;P&gt;Or I would use REGEX and FORMAT in transforms.conf if you only want this to work at search time / not manipulate the data at all. However that will be a bit more challenging.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 02:16:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321309#M59920</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-05-30T02:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using DELIMS with a string instead of single character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321310#M59921</link>
      <description>&lt;P&gt;You could do it like this but it's laborious:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; REGEX=(?&amp;lt;field1&amp;gt;.+)\#011(?&amp;lt;field2&amp;gt;.+)\#011....
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 May 2017 02:22:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321310#M59921</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-05-30T02:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using DELIMS with a string instead of single character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321311#M59922</link>
      <description>&lt;P&gt;Hi @jkat54, that's exactly what I would like to avoid &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Your suggestion worked fine! Just a little detail for the record and future references.&lt;BR /&gt;
In prop.conf I had to put:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_new_sourcetype]
REPORT-TMG_over_nxlog=TMG_over_nxlog
SEDCMD-fixdelims= s/#011/|/g
SEDCMD-fixNXlogHeader= s/PROXY \-/PROXY |/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The second SEDCMD is to reflect the header added by nxlog to each TMG log.&lt;BR /&gt;
And in transform.conf that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[TMG_over_nxlog]
DELIMS = "\|"
FIELDS = "nxlog-header","c-ip","cs-username","c-agent","date","time","s-computername","cs-referred","r-host","r-ip","r-port","time-taken","sc-bytes","cs-bytes","cs-protocol","s-operation","cs-uri","cs-mime-type","s-object-source","sc-status","rule","FilterInfo","cs-network","sc-network","error-info","action","AuthenticationServer","NIS_scan_result","NIS_signature","ThreatName","MalwareInspectionAction","MalwareInspectionResult","UrlCategory","MalwareInspectionContentDeliveryMethod","MalwareInspectionDuration","MalwareInspectionThreatLevel","internal-service-info","NIS_application_protocol","NAT_address","UrlCategorizationReason","SessionType","UrlDestHost","s-port"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And restart splunk.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 07:19:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321311#M59922</guid>
      <dc:creator>restevan</dc:creator>
      <dc:date>2017-05-30T07:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using DELIMS with a string instead of single character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321312#M59923</link>
      <description>&lt;P&gt;Sweet then!  I love it when folks can take my suggestion and "run with it".  If you feel I helped you solve the answer, then feel free to mark mine as the answer.  Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 12:56:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321312#M59923</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-05-30T12:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using DELIMS with a string instead of single character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321313#M59924</link>
      <description>&lt;P&gt;Excellent!.  @restevan - please mark answer as accepted.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 13:33:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-DELIMS-with-a-string-instead-of-single-character/m-p/321313#M59924</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-05-30T13:33:32Z</dc:date>
    </item>
  </channel>
</rss>

