<?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: Linebreaking input in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Linebreaking-input/m-p/18196#M2467</link>
    <description>&lt;OL&gt;
&lt;LI&gt;Its a Windows server, the file is on a distant server so my \server is working pretty well&lt;/LI&gt;
&lt;LI&gt;I forgot the source:: , thks ! Working now (Another problem i didnt mention solved)&lt;/LI&gt;
&lt;LI&gt;Actually this was good cause there was a mistake in the first logs i had where there was 2 commas. But they fixed it, so the ,? said that there could be or not a comma here , depending on the version of the log. With ^and$ was ok.
To finish.  its working now, dont know why cause i didnt change nothing. Maybe a lag on my server.
Thks for your help !&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Tue, 30 Jul 2013 15:10:32 GMT</pubDate>
    <dc:creator>timmalos</dc:creator>
    <dc:date>2013-07-30T15:10:32Z</dc:date>
    <item>
      <title>Linebreaking input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Linebreaking-input/m-p/18193#M2464</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
Im sorry to disturb you but cant manage to solve my problem. Got Inputs like that :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Titlis,NetBackup Client Service,0,Auto,OK,0 
Titlis,NetBackup Compatibility Service,0,Auto,OK,0 
Titlis,NetBackup Remote Manager and Monitor Service,0,Auto,OK,0 
Titlis,NetBackup Service Layer,0,Auto,OK,0 
Weisshorn,NetBackup Service Layer,0,Auto,OK,0 
Weisshorn,NetBackup Service Monitor,0,Auto,OK,0 
Weisshorn,NetBackup Volume Manager,0,Auto,OK,0 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want each line to be an event, with the timestamp of the modified file.&lt;BR /&gt;
Here is my props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[NbService]
DATETIME_CONFIG = NONE
SHOULD_LINEMERGE=false
EXTRACT-NbService =^(?P&amp;lt;server&amp;gt;[^,]+),(?P&amp;lt;serviceName&amp;gt;[^,]+),,?(?P&amp;lt;serviceState&amp;gt;[^,]+),(?P&amp;lt;servicePolicy&amp;gt;[^,]+),(?P&amp;lt;serviceStatus&amp;gt;[^,]+),(?P&amp;lt;service&amp;gt;[^,]+)$

[\\matterhorn\Netbackup4Splunk\OUT_services.txt]
CHECK_METHOD = modtime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And my inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://\\matterhorn\Netbackup4Splunk\OUT_services.txt]
disabled = 0
followTail = 0
sourcetype = NbService
index = Infra_NB
host = Matterhorn
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Tried other params but every time i got only one event with all the lines merged. Other inputs who got Timestamp work perfectly.&lt;BR /&gt;
Thks for ur help&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2013 07:10:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Linebreaking-input/m-p/18193#M2464</guid>
      <dc:creator>timmalos</dc:creator>
      <dc:date>2013-07-30T07:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Linebreaking input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Linebreaking-input/m-p/18194#M2465</link>
      <description>&lt;P&gt;ok, a couple things I'm seeing here.  Not sure if any of them will actually fix your problem.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;In your inputs.conf, your monitor statement looks weird.  Is this a Windows system?  If so, I'd expect to see something like:&lt;/P&gt;

&lt;P&gt;[monitor://C:\blah]&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Also, in your props.conf, I'd again expect to see a drive letter, but also, I think you meant to put:&lt;/P&gt;

&lt;P&gt;[source::C:\blah]&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Finally, and this definitely doesn't have anything to do with the issue, in your EXTRACT statement, you have:&lt;/P&gt;

&lt;P&gt;...(?P&lt;SERVICENAME&gt;[^,]+),,?...&lt;/SERVICENAME&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;but I think you should probably have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...(?P&amp;lt;serviceName&amp;gt;[^,]+),?...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You had an extra comma in there.  That may have just been a typo in your writeup though.&lt;/P&gt;

&lt;P&gt;Otherwise, I don't really see why what you have wouldn't work.&lt;/P&gt;

&lt;P&gt;I suppose you could also try specifying a line breaker.  Something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LINE_BREAKER = ([\r\n]+)(?\w+,)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jul 2013 14:42:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Linebreaking-input/m-p/18194#M2465</guid>
      <dc:creator>mloven_splunk</dc:creator>
      <dc:date>2013-07-30T14:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Linebreaking input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Linebreaking-input/m-p/18195#M2466</link>
      <description>&lt;P&gt;There are two parts to the answer to your question:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;List breaker&lt;/LI&gt;
&lt;LI&gt;Date of Event&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;&lt;STRONG&gt;Line Breaker:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;The primordial, inherent line breaker in Splunk is a time stamp. If the events in your data do not have a time stamp, then you must tell Splunk how to break the events. There are multiple methods for this and the following works well in your case.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#inputs.conf
[monitor:///tests/answers/7-30-2013/1/data]
disabled = false
sourcetype = answers-1375192607
index = test

#props.conf
[answers-1375192607]
SHOULD_LINEMERGE = False
LINE_BREAKER = ([\r\n]+)[A-Z][a-z]+,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will break the events when a line return is found and a full word capitalized, followed by a comma. &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;STRONG&gt;Date of Event&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Notice that the date and time for all of the events is reflected by the file modification time. That is: the time when the file was last updated.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[gcastill0@sandbox 1]# pwd
/media/answers/7-30-2013/1
[gcastill0@sandbox 1]# ls -ltr
total 4
-rw-r--r-- 1 root root 350 Jul 30 09:54 data
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;All of the events, therefore, inherit this time stamp.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/Untitled801.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Any subsequent event additions to the file will reflect the file modification time. For instance, we append an additional entry, like this one&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Gcastill0,NetBackup Volume Manager,0,Auto,OK,0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to the end of your data, you see the following:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/Untitled802.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;... Which reflects the file modification time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[gcastill0@sandbox 1]# pwd
/media/answers/7-30-2013/1
[gcastill0@sandbox 1]# ls -ltr
total 4
-rw-r--r-- 1 root root 396 Jul 30 10:36 data
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;There is a school of thought about being able to extract the date of an event using &lt;CODE&gt;datetime.xml&lt;/CODE&gt; -where you look at the file name and extract the data. Before you consider that, please note that the time of day piece is not inherited from the field extractions. Time of day is obtained from the event (index time) and/or from the file modification time.&lt;/P&gt;

&lt;P&gt;In other words, the suggestions above are your best option to obtain a precise date and time for the events going forward. Anything historical will inherit the date and time of the first-time index process.&lt;/P&gt;

&lt;P&gt;I hope this helps,&lt;/P&gt;

&lt;P&gt;--gc&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2013 14:52:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Linebreaking-input/m-p/18195#M2466</guid>
      <dc:creator>Gilberto_Castil</dc:creator>
      <dc:date>2013-07-30T14:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Linebreaking input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Linebreaking-input/m-p/18196#M2467</link>
      <description>&lt;OL&gt;
&lt;LI&gt;Its a Windows server, the file is on a distant server so my \server is working pretty well&lt;/LI&gt;
&lt;LI&gt;I forgot the source:: , thks ! Working now (Another problem i didnt mention solved)&lt;/LI&gt;
&lt;LI&gt;Actually this was good cause there was a mistake in the first logs i had where there was 2 commas. But they fixed it, so the ,? said that there could be or not a comma here , depending on the version of the log. With ^and$ was ok.
To finish.  its working now, dont know why cause i didnt change nothing. Maybe a lag on my server.
Thks for your help !&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 30 Jul 2013 15:10:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Linebreaking-input/m-p/18196#M2467</guid>
      <dc:creator>timmalos</dc:creator>
      <dc:date>2013-07-30T15:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Linebreaking input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Linebreaking-input/m-p/18197#M2468</link>
      <description>&lt;P&gt;I delete the file each time before new datas, no probleé with the modification time. Actually its working now, i dont really know what i modified but its ok... Thks for your help.&lt;/P&gt;

&lt;H1&gt;props.conf&lt;/H1&gt;

&lt;P&gt;[source::NbServices.txt]&lt;BR /&gt;
CHECK_METHOD = modtime&lt;BR /&gt;
DATETIME_CONFIG = NONE&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
[NbServices]&lt;BR /&gt;
EXTRACT-NbService = ^(?P&lt;SERVER&gt;[^,]+),(?P&lt;SERVICENAME&gt;[^,]+),(?P&lt;SERVICESTATE&gt;[^,]+),(?P&lt;SERVICEPOLICY&gt;[^,]+),(?P&lt;SERVICESTATUS&gt;[^,]+),(?P&lt;SERVICEEXITCODE&gt;[^,]+)$&lt;/SERVICEEXITCODE&gt;&lt;/SERVICESTATUS&gt;&lt;/SERVICEPOLICY&gt;&lt;/SERVICESTATE&gt;&lt;/SERVICENAME&gt;&lt;/SERVER&gt;&lt;/P&gt;

&lt;H1&gt;inputs.conf&lt;/H1&gt;

&lt;P&gt;[default]&lt;BR /&gt;
initCrcLength = 2048&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;/P&gt;

&lt;P&gt;Will put ur answer as correct for the time u spent &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Linebreaking-input/m-p/18197#M2468</guid>
      <dc:creator>timmalos</dc:creator>
      <dc:date>2020-09-28T14:27:42Z</dc:date>
    </item>
  </channel>
</rss>

