<?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 Using regex, how to exclude any events in the host field and keep the rest? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-how-to-exclude-any-events-in-the-host-field-and-keep/m-p/384273#M112234</link>
    <description>&lt;P&gt;One big syslog file I need to index (monitor) daily. Many hosts log to this syslog file. &lt;/P&gt;

&lt;P&gt;I want to exclude any events that contain 'server1' in the host field, and keep the rest. &lt;/P&gt;

&lt;P&gt;On the receiving indexer, the following is in /opt/splunk/etc/system/local&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/syslog/Security/*.log]
TRANSFORMS-set = setnull, setparsing
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = server1
DEST_KEY = queue
FORMAT = nullQueue
[setparsing]
REGEX = .
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where might I have gone wrong? This does not seem to work.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jun 2018 17:29:05 GMT</pubDate>
    <dc:creator>some_guy</dc:creator>
    <dc:date>2018-06-14T17:29:05Z</dc:date>
    <item>
      <title>Using regex, how to exclude any events in the host field and keep the rest?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-how-to-exclude-any-events-in-the-host-field-and-keep/m-p/384273#M112234</link>
      <description>&lt;P&gt;One big syslog file I need to index (monitor) daily. Many hosts log to this syslog file. &lt;/P&gt;

&lt;P&gt;I want to exclude any events that contain 'server1' in the host field, and keep the rest. &lt;/P&gt;

&lt;P&gt;On the receiving indexer, the following is in /opt/splunk/etc/system/local&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/syslog/Security/*.log]
TRANSFORMS-set = setnull, setparsing
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = server1
DEST_KEY = queue
FORMAT = nullQueue
[setparsing]
REGEX = .
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where might I have gone wrong? This does not seem to work.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 17:29:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-how-to-exclude-any-events-in-the-host-field-and-keep/m-p/384273#M112234</guid>
      <dc:creator>some_guy</dc:creator>
      <dc:date>2018-06-14T17:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using regex, how to exclude any events in the host field and keep the rest?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-how-to-exclude-any-events-in-the-host-field-and-keep/m-p/384274#M112235</link>
      <description>&lt;P&gt;Make sure to set your SOURCE_KEY = MetaData:Host under the [setnull] stanza in transforms.conf. That will get rid of the unwanted events, you shouldn't need the second stanza as the rest of the events that don't contain "server1" in the host field should get ingested per the rest of the parameters set in props.conf.&lt;/P&gt;

&lt;P&gt;let me know if that helps.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 18:44:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-how-to-exclude-any-events-in-the-host-field-and-keep/m-p/384274#M112235</guid>
      <dc:creator>lacastillo</dc:creator>
      <dc:date>2018-06-14T18:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using regex, how to exclude any events in the host field and keep the rest?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-how-to-exclude-any-events-in-the-host-field-and-keep/m-p/384275#M112236</link>
      <description>&lt;P&gt;Alleluia, its finally working!!! The key is, as you said:&lt;/P&gt;

&lt;P&gt;SOURCE_KEY = MetaData:Host&lt;/P&gt;

&lt;P&gt;THANKS!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 19:07:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-how-to-exclude-any-events-in-the-host-field-and-keep/m-p/384275#M112236</guid>
      <dc:creator>some_guy</dc:creator>
      <dc:date>2018-06-14T19:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using regex, how to exclude any events in the host field and keep the rest?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-how-to-exclude-any-events-in-the-host-field-and-keep/m-p/384276#M112237</link>
      <description>&lt;P&gt;You're very welcome!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 19:09:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-how-to-exclude-any-events-in-the-host-field-and-keep/m-p/384276#M112237</guid>
      <dc:creator>lacastillo</dc:creator>
      <dc:date>2018-06-14T19:09:23Z</dc:date>
    </item>
  </channel>
</rss>

