<?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: How can I merge multiple mail log lines into one event in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268951#M51638</link>
    <description>&lt;P&gt;This is first time setting up the data source for splunk use. I'm looking for the best way to organize the data, so that queries will be as fast and easy to use in the future. I don't have any existing data in the Splunk server.&lt;BR /&gt;
The Splunk data server and indexer is the same machine.&lt;BR /&gt;
I'm looking for the location of the props.conf. Theres a lot in etc/apps and others in etc/system/default.&lt;BR /&gt;
Which one is the correct file to change?&lt;/P&gt;</description>
    <pubDate>Sun, 23 Oct 2016 20:05:20 GMT</pubDate>
    <dc:creator>lars_meldgaard</dc:creator>
    <dc:date>2016-10-23T20:05:20Z</dc:date>
    <item>
      <title>How can I merge multiple mail log lines into one event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268947#M51634</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I want to examine my mail server logfile. The logfile has many lines per logsession. Each line starts with a timestamp, then followed by a sessionid in [ and ]. Rest of line is data.&lt;BR /&gt;
Each session is separated with ----------&lt;/P&gt;

&lt;P&gt;Example lines&lt;BR /&gt;
'Thu 2016-10-20 00:00:39: [39647:2] --&amp;gt; 250-ETRN&lt;BR /&gt;
Thu 2016-10-20 00:00:39: [39647:2] --&amp;gt; 250-AUTH LOGIN CRAM-MD5 PLAIN&lt;BR /&gt;
Thu 2016-10-20 00:00:39: [39647:2] --&amp;gt; 250-8BITMIME&lt;BR /&gt;
Thu 2016-10-20 00:00:40: [39647:2] --&amp;gt; 250-STARTTLS&lt;BR /&gt;
Thu 2016-10-20 00:00:41: [39647:2] --&amp;gt; 250 SIZE&lt;/P&gt;

&lt;P&gt;Example Event separator:&lt;BR /&gt;
Thu 2016-10-20 00:00:42: ----------&lt;/P&gt;

&lt;P&gt;How can I make splunk Group all relevant lines into one event?&lt;BR /&gt;
I'm running a Windows system with Splunk Light&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 19:34:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268947#M51634</guid>
      <dc:creator>lars_meldgaard</dc:creator>
      <dc:date>2016-10-22T19:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge multiple mail log lines into one event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268948#M51635</link>
      <description>&lt;P&gt;This sounds like a good case to use the &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.0/Data/Configureeventlinebreaking"&gt;LINE_BREAKER&lt;/A&gt; setting in props.conf.  Something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your:sourcetype]
LINE_BREAKER = (\w{3}\s\d{4}\-\d{2}\-\d{2}\s\d{2}:\d{2}:\d{2}:\s\-+)
MAX_TIMESTAMP_LOOKAHEAD = 30
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will tell splunk to use those separators as line breakers instead of the default \r\n.  As a result, they won't show up in your data.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 12:48:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268948#M51635</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2016-10-23T12:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge multiple mail log lines into one event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268949#M51636</link>
      <description>&lt;P&gt;Sorry to be a bit slow here.&lt;/P&gt;

&lt;P&gt;I'm not sure where props.conf is located.&lt;BR /&gt;
From the web interface of Splunk, I have added the wildcard to monitor, so this is located in apps/_server_app_mail/local/inputs.conf&lt;/P&gt;

&lt;P&gt;There is not existing props.conf file. Should I just add one in this directory?&lt;/P&gt;

&lt;P&gt;And so your regex deletes the timestamps?&lt;/P&gt;

&lt;P&gt;I was kinda looking for something so I can group by sessionid ([39647:2])  - (whatever is in the brackets).&lt;BR /&gt;
End goal is to list how many sessions has a specific line associated&lt;BR /&gt;
e.g.&lt;BR /&gt;
Fri 2016-10-21 12:40:01: [55444:3] *  zen.spamhaus.org - failed - 127.0.0.4&lt;/P&gt;

&lt;P&gt;Hope you can elaborate a bit. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:31:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268949#M51636</guid>
      <dc:creator>lars_meldgaard</dc:creator>
      <dc:date>2020-09-29T11:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge multiple mail log lines into one event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268950#M51637</link>
      <description>&lt;P&gt;When you modify &lt;CODE&gt;props.conf&lt;/CODE&gt;, it will be on the indexer, not the forwarder where &lt;CODE&gt;inputs.conf&lt;/CODE&gt; is located. Your indexer is a central server where data is forwarded to, this is responsible for indexing and parsing the data, so it would make sense to put linebreaking rules where the data is parsed. Making changes to &lt;CODE&gt;props.conf&lt;/CODE&gt; will not work retroactively and will ONLY apply those changes to data being indexed after the changes were applied. So you have 3 options&lt;/P&gt;

&lt;P&gt;1) Apply the changes to &lt;CODE&gt;props.conf&lt;/CODE&gt; and your older data will not be parsed correctly&lt;BR /&gt;
2) Apply changes to &lt;CODE&gt;props.conf&lt;/CODE&gt; and verify your linebreaking is correct, then delete the old data and reindex your data with the changes applied&lt;BR /&gt;
3) Use a &lt;CODE&gt;transaction&lt;/CODE&gt; or &lt;CODE&gt;stats&lt;/CODE&gt; command to combine the events at search time without having to set any line breaking rules on your indexer &lt;/P&gt;

&lt;P&gt;Are you looking for a permanent solution to group these into a single event?&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 17:51:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268950#M51637</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-10-23T17:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge multiple mail log lines into one event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268951#M51638</link>
      <description>&lt;P&gt;This is first time setting up the data source for splunk use. I'm looking for the best way to organize the data, so that queries will be as fast and easy to use in the future. I don't have any existing data in the Splunk server.&lt;BR /&gt;
The Splunk data server and indexer is the same machine.&lt;BR /&gt;
I'm looking for the location of the props.conf. Theres a lot in etc/apps and others in etc/system/default.&lt;BR /&gt;
Which one is the correct file to change?&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 20:05:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268951#M51638</guid>
      <dc:creator>lars_meldgaard</dc:creator>
      <dc:date>2016-10-23T20:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge multiple mail log lines into one event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268952#M51639</link>
      <description>&lt;P&gt;Ok this narrows it down, you should take suggestion 1 above, which is to set &lt;CODE&gt;line_breaker&lt;/CODE&gt;  in your &lt;CODE&gt;props.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;props.conf&lt;/CODE&gt; file is located in &lt;CODE&gt;%SPLUNK_HOME/etc/system/local&lt;/CODE&gt;on the indexer. &lt;/P&gt;

&lt;P&gt;Insert this stanza into your &lt;CODE&gt;props.conf&lt;/CODE&gt; file&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your:sourcetype]
 LINE_BREAKER = (\w{3}\s\d{4}\-\d{2}\-\d{2}\s\d{2}:\d{2}:\d{2}:\s\-+)
 MAX_TIMESTAMP_LOOKAHEAD = 30`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Replace "your:sourcetype" with the sourcetype name you specified in your &lt;CODE&gt;inputs.conf&lt;/CODE&gt; which is on the forwarder under &lt;CODE&gt;%SPLUNK_HOME/etc/system/local/inputs.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;After you've made these changes on your indexer, restart the splunk service and verify the linebreaking is correct &lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 20:55:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268952#M51639</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-10-23T20:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge multiple mail log lines into one event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268953#M51640</link>
      <description>&lt;P&gt;To Recap: put the suggested lines on splunk Indexing server in $SPLUNK$/etc/system/default/props.conf&lt;BR /&gt;
To modify the actual input I had to add a few lines on the input of the forwarding server as well. In my case in SplunkUniversalForwarder\etc\apps_server_app_mail\local\inputs.conf&lt;/P&gt;

&lt;P&gt;I needed&lt;BR /&gt;
crcSalt = &lt;BR /&gt;
ignoreOlderThan=3d&lt;BR /&gt;
maybe because i tried a few times and need to clear the data&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:32:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268953#M51640</guid>
      <dc:creator>lars_meldgaard</dc:creator>
      <dc:date>2020-09-29T11:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge multiple mail log lines into one event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268954#M51641</link>
      <description>&lt;P&gt;No. Do not put this under &lt;CODE&gt;/default/props.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;You want to place this under &lt;CODE&gt;/etc/system/local/props.conf&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 21:06:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268954#M51641</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-10-23T21:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge multiple mail log lines into one event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268955#M51642</link>
      <description>&lt;P&gt;Ah just missed your post. Very good answer&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 21:43:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268955#M51642</guid>
      <dc:creator>lars_meldgaard</dc:creator>
      <dc:date>2016-10-23T21:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge multiple mail log lines into one event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268956#M51643</link>
      <description>&lt;P&gt;Hope I did this now. Thanks for your help&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 21:43:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-multiple-mail-log-lines-into-one-event/m-p/268956#M51643</guid>
      <dc:creator>lars_meldgaard</dc:creator>
      <dc:date>2016-10-23T21:43:36Z</dc:date>
    </item>
  </channel>
</rss>

