<?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: Timestamp in every single line in multiline events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-in-every-single-line-in-multiline-events/m-p/53408#M10312</link>
    <description>&lt;P&gt;No, that part is created/written by the logging function, it looks to me as standard syslog behaviour, i.e. prepending the log message with a timestamp and the hostname/IP of the sending application/server.&lt;/P&gt;

&lt;P&gt;I guess that you should try to configure your SyslogAppender to treat your messages as multi-line - if that is possible.&lt;/P&gt;

&lt;P&gt;hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian &lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2012 12:18:09 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2012-01-19T12:18:09Z</dc:date>
    <item>
      <title>Timestamp in every single line in multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-in-every-single-line-in-multiline-events/m-p/53407#M10311</link>
      <description>&lt;P&gt;I've configured my splunk to recieve data from syslog via udp. The application uses a SyslogAppender in it's log4j configuration.&lt;BR /&gt;
I edited my props.conf to get multiline log messages as a single event in splunk.&lt;BR /&gt;
So far everything works fine. &lt;/P&gt;

&lt;P&gt;But there's a timestamp and ip, wich (i believe) is generated by splunk, as prefix of every single line in an multiline event. This timestamp/IP prefix reduces readability of log messages dramaticaly. &lt;/P&gt;

&lt;P&gt;Therefore I would like to know if there's a way to make splunk not to display these information in every single line?   &lt;/P&gt;

&lt;P&gt;here's an example of an event as displayed in splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jan 18 12:08:26 10.228.45.52 ERROR [18.01.12 12:08:26] RequestCycle - Too many path parts,
please provide sufficient number of path parameter names [thread: http-8080-16]
Jan 18 12:08:26 10.228.45.52 java.lang.IllegalArgumentException: Too many path parts, please      provide sufficient number of path parameter names
Jan 18 12:08:26 10.228.45.52     at   org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy.decodeParameters(MixedParamUrlCodingStrategy.java:178)
Jan 18 12:08:26 10.228.45.52     at org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode()
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The 'Jan 18 12:08:26 10.228.45.52' timestamp/IP part is the one I would like not to diplay at all, or display only at the very begining of each event.&lt;/P&gt;

&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2012 11:32:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-in-every-single-line-in-multiline-events/m-p/53407#M10311</guid>
      <dc:creator>rSteinbrenner</dc:creator>
      <dc:date>2012-01-18T11:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in every single line in multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-in-every-single-line-in-multiline-events/m-p/53408#M10312</link>
      <description>&lt;P&gt;No, that part is created/written by the logging function, it looks to me as standard syslog behaviour, i.e. prepending the log message with a timestamp and the hostname/IP of the sending application/server.&lt;/P&gt;

&lt;P&gt;I guess that you should try to configure your SyslogAppender to treat your messages as multi-line - if that is possible.&lt;/P&gt;

&lt;P&gt;hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian &lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2012 12:18:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-in-every-single-line-in-multiline-events/m-p/53408#M10312</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-01-19T12:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in every single line in multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-in-every-single-line-in-multiline-events/m-p/53409#M10313</link>
      <description>&lt;P&gt;Yes you can do it using the following line in props.conf against your source type.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-strip-timestamps = s/^[A-Z][a-z]{2}\s+\d{1,2}\s+\d\d:\d\d:\d\d((?!\s+\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+[A-Z]+\s+).*)/\1/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;NB:  This will leave the first timestamp alone and remove all the others in each event.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ cat inputs.conf 
[monitor://$SPLUNK_HOME/etc/apps/testApp/logs/testfile.log]
index = test
sourcetype = testfile

$ cat indexes.conf 
[test]
homePath = $SPLUNK_DB/test/db
coldPath = $SPLUNK_DB/test/colddb
thawedPath = $SPLUNK_DB/test/thaweddb

$ cat props.conf 
[testfile]
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE_DATE = false
BREAK_ONLY_BEFORE = ^[A-Z][a-z]{2}\s+\d{1,2}\s+\d\d:\d\d:\d\d\s+\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+[A-Z]+\s+
TIME_FORMAT = %b %d %T
TIME_PREFIX = ^
MAX_TIMESTAMP_LOOKAHEAD = 20
SEDCMD-strip-timestamps = s/^[A-Z][a-z]{2}\s+\d{1,2}\s+\d\d:\d\d:\d\d((?!\s+\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+[A-Z]+\s+).*)/\1/g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Jan 2012 14:25:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-in-every-single-line-in-multiline-events/m-p/53409#M10313</guid>
      <dc:creator>itinney</dc:creator>
      <dc:date>2012-01-19T14:25:11Z</dc:date>
    </item>
  </channel>
</rss>

