<?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 How do I find and remove strings in logs from the Forwarder? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-find-and-remove-strings-in-logs-from-the-Forwarder/m-p/457669#M79110</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to send some antivirus logs from the forwarder into Splunk.&lt;/P&gt;

&lt;P&gt;The logs I'm sending have a tendency to spam, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;13/09/2018 16:06:53 No usable rule found    Blocked 192.168.0.40:53354  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:54 No usable rule found    Blocked 192.168.0.40:52091  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:54 No usable rule found    Blocked 192.168.0.40:49467  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:54 No usable rule found    Blocked 192.168.0.40:53354  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:55 No usable rule found    Blocked 192.168.0.40:52091  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:56 No usable rule found    Blocked 192.168.0.40:53354  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:57 No usable rule found    Blocked 192.168.0.40:52091  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:58 No usable rule found    Blocked 192.168.0.40:56694  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:59 No usable rule found    Blocked 192.168.0.40:56694  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to be able to filter out lines in the log that say "No usable rule found". &lt;/P&gt;

&lt;P&gt;I've tried adding the following to props.conf which I've copied into [C:\Program Files\SplunkUniversalForwarder\etc\system\local] directory, here is the line I added to props.conf: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source:\path\to\log\log.txt]
SEDCMD-strip-detail-msg=^.*(listening on the port|[Nn]o usable rule found)*$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have also tried messing with transform.conf too, but to no avail.&lt;/P&gt;

&lt;P&gt;Any ideas guys?&lt;/P&gt;</description>
    <pubDate>Fri, 14 Sep 2018 07:04:09 GMT</pubDate>
    <dc:creator>brandonmcgrath1</dc:creator>
    <dc:date>2018-09-14T07:04:09Z</dc:date>
    <item>
      <title>How do I find and remove strings in logs from the Forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-find-and-remove-strings-in-logs-from-the-Forwarder/m-p/457669#M79110</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to send some antivirus logs from the forwarder into Splunk.&lt;/P&gt;

&lt;P&gt;The logs I'm sending have a tendency to spam, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;13/09/2018 16:06:53 No usable rule found    Blocked 192.168.0.40:53354  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:54 No usable rule found    Blocked 192.168.0.40:52091  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:54 No usable rule found    Blocked 192.168.0.40:49467  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:54 No usable rule found    Blocked 192.168.0.40:53354  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:55 No usable rule found    Blocked 192.168.0.40:52091  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:56 No usable rule found    Blocked 192.168.0.40:53354  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:57 No usable rule found    Blocked 192.168.0.40:52091  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:58 No usable rule found    Blocked 192.168.0.40:56694  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
13/09/2018 16:06:59 No usable rule found    Blocked 192.168.0.40:56694  192.168.0.30:53 UDP     C:\Windows\System32\dns.exe NT AUTHORITY\SYSTEM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to be able to filter out lines in the log that say "No usable rule found". &lt;/P&gt;

&lt;P&gt;I've tried adding the following to props.conf which I've copied into [C:\Program Files\SplunkUniversalForwarder\etc\system\local] directory, here is the line I added to props.conf: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source:\path\to\log\log.txt]
SEDCMD-strip-detail-msg=^.*(listening on the port|[Nn]o usable rule found)*$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have also tried messing with transform.conf too, but to no avail.&lt;/P&gt;

&lt;P&gt;Any ideas guys?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 07:04:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-find-and-remove-strings-in-logs-from-the-Forwarder/m-p/457669#M79110</guid>
      <dc:creator>brandonmcgrath1</dc:creator>
      <dc:date>2018-09-14T07:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I find and remove strings in logs from the Forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-find-and-remove-strings-in-logs-from-the-Forwarder/m-p/457670#M79111</link>
      <description>&lt;P&gt;Universal forwarders cannot filter events.  You must use a heavy forwarder or put your props.conf settings on your indexers.&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;SEDCMD&lt;/CODE&gt; setting is not correct.  It must be in the format &lt;CODE&gt;s/&amp;lt;search regex&amp;gt;/&amp;lt;replacement string&amp;gt;/&lt;/CODE&gt;.  Replacing the entire event string will not remove the event.  To remove unwanted events, send them to nullQueue like so:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source:\path\to\log\log.txt] 
TRANSFORMS-set = setnull,setparsing
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = (listening on the port|[Nn]o usable rule found)
DEST_KEY = queue
FORMAT = nullQueue

[setparsing]
REGEX = .
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Sep 2018 11:25:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-find-and-remove-strings-in-logs-from-the-Forwarder/m-p/457670#M79111</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-09-14T11:25:17Z</dc:date>
    </item>
  </channel>
</rss>

