<?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: Failed to remove lines from log files before indexing using SEDCMD command in props.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356437#M65119</link>
    <description>&lt;P&gt;Please let me know if the answer was useful for you. If it was, accept it and upvote. If not, give us more input so we can help you with that&lt;/P&gt;</description>
    <pubDate>Wed, 21 Mar 2018 17:19:33 GMT</pubDate>
    <dc:creator>tiagofbmm</dc:creator>
    <dc:date>2018-03-21T17:19:33Z</dc:date>
    <item>
      <title>Failed to remove lines from log files before indexing using SEDCMD command in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356433#M65115</link>
      <description>&lt;P&gt;We are trying to remove few lines from log files before indexing using SEDCMD command in props.conf.&lt;BR /&gt;
We are using universal forwarder and we have only one Splunk Enterprise server.&lt;BR /&gt;
Search and Index are both installed in that Splunk Enterprise server.&lt;BR /&gt;
For testing purpose we have written the below command in props.conf (D:\SPLUNK\etc\apps\search\local) in the Splunk Enterprise server.&lt;/P&gt;

&lt;P&gt;[sourcetype]&lt;BR /&gt;
SEDCMD-alter=s/Lastline//g&lt;/P&gt;

&lt;P&gt;We were expecting that the word 'Lastline' will not appear in the search but it didn't work.&lt;/P&gt;

&lt;P&gt;Could you please suggest anyway to solve this.&lt;/P&gt;

&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2018 11:11:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356433#M65115</guid>
      <dc:creator>saibal6</dc:creator>
      <dc:date>2018-03-16T11:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to remove lines from log files before indexing using SEDCMD command in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356434#M65116</link>
      <description>&lt;P&gt;Is the data that you can search in Splunk with the correct sourcetype?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2018 11:23:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356434#M65116</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-16T11:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to remove lines from log files before indexing using SEDCMD command in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356435#M65117</link>
      <description>&lt;P&gt;Yes. I can search it in Splunk with the correct sourcetype&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2018 12:06:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356435#M65117</guid>
      <dc:creator>saibal6</dc:creator>
      <dc:date>2018-03-16T12:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to remove lines from log files before indexing using SEDCMD command in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356436#M65118</link>
      <description>&lt;P&gt;I created a sourcetype named lastline in SPLUNK_HOME/etc/apps/search/local/props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[lastline]
SEDCMD-alter=s/Lastline//g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Restarted Splunk&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Created a dummy file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Tiago Lastline TiagoTiagog 
Lastline asdkas dasds asd a12 e122wqd 12e ` 2 
Lastline
Last    wdqas
asdasd Lastline
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the result was the expected &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Tiago  TiagoTiagog 
 asdkas dasds asd a12 e122wqd 12e ` 2 

Last    wdqas
asdasd 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you have &lt;STRONG&gt;restarted splunk after creating the sourcetype in props and your events have the sourcetype "lastline" and still you don't have the expected results&lt;/STRONG&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Do this $SPLUNK_HOME/bin/splunk btool props list -- debug 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Find your sourcetype and check if your SEDCMD is there in the Stanza&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2018 12:15:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356436#M65118</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-16T12:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to remove lines from log files before indexing using SEDCMD command in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356437#M65119</link>
      <description>&lt;P&gt;Please let me know if the answer was useful for you. If it was, accept it and upvote. If not, give us more input so we can help you with that&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 17:19:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356437#M65119</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-21T17:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to remove lines from log files before indexing using SEDCMD command in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356438#M65120</link>
      <description>&lt;P&gt;Hi tiagofbmm,&lt;/P&gt;

&lt;P&gt;Sorry for the late reply.&lt;BR /&gt;
Yes, your information is correct and it is working properly.&lt;BR /&gt;
I want exactly this kind of solutions.&lt;/P&gt;

&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 12:14:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Failed-to-remove-lines-from-log-files-before-indexing-using/m-p/356438#M65120</guid>
      <dc:creator>saibal6</dc:creator>
      <dc:date>2018-03-22T12:14:45Z</dc:date>
    </item>
  </channel>
</rss>

