<?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: Setting heavy forwarder for sending only few events which matched with Regx in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165943#M33669</link>
    <description>&lt;P&gt;&lt;CODE&gt;REGEX = (oauth\.googleusercontent|ssl\.gstatic|fb|twitter)\.com&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Should work.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2014 12:07:43 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2014-02-26T12:07:43Z</dc:date>
    <item>
      <title>Setting heavy forwarder for sending only few events which matched with Regx</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165937#M33663</link>
      <description>&lt;P&gt;I am setting up heavy forwarder on multiple machine, out of that one of them have below requirement,&lt;/P&gt;

&lt;P&gt;1)  Heavy forwarder should forward sub-set of events which match with given pattern and not all the events. &lt;/P&gt;

&lt;P&gt;I search over web, I found couple of Q&amp;amp;A regarding the same but it’s seem not working for me. &lt;BR /&gt;
First solutions I tried: &lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/9076/how-to-configure-a-forwarder-to-filter-and-send-only-the-events-i-want"&gt;http://answers.splunk.com/answers/9076/how-to-configure-a-forwarder-to-filter-and-send-only-the-events-i-want&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;On the above solution, I can see in forwarder log, it’s continuously saying could not connect with 0.0.0.0:0 and connection failing but nothing is getting forwarded at Indexer side.&lt;BR /&gt;
Second solution:&lt;/P&gt;

&lt;P&gt;I tried with forwarding everything into NullQueue and forward only event which match with REGX by setting up two stanza into transforms.conf.&lt;/P&gt;

&lt;P&gt;Seems that above solution also does not work for me. &lt;/P&gt;

&lt;P&gt;Pattern which I want to match is following,&lt;/P&gt;

&lt;P&gt;oauth.googleusercontent.com, ssl.gstatic.com, fb.com, twitter.com &lt;/P&gt;

&lt;P&gt;Heavy forwarder should only send events to indexer if events matched with any of the above patterns. &lt;/P&gt;

&lt;P&gt;Please let me know, if you have any question regarding the same.&lt;BR /&gt;
I have already spend one full day in exploring above but could not find solution. &lt;/P&gt;

&lt;P&gt;Sorry to raise this question in that manner but i feel very sad after investigating over a day and could not find solution, Below are the configuration i am suing at my heavy forwarder side.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;[host::&lt;HOSTNAME&gt;]&lt;BR /&gt;
TRANSFORMS-set =setnull, allowtheseevents&lt;/HOSTNAME&gt;&lt;/P&gt;

&lt;P&gt;transform.conf&lt;BR /&gt;
[setnull]&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[allowtheseevents]&lt;BR /&gt;
REGEX = (?m)ssl.gstatic.com&lt;BR /&gt;
FORMAT = splunkindexer_9997&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;BR /&gt;
[monitor:///usr/local/logfilename.log]&lt;BR /&gt;
index = main&lt;BR /&gt;
sourcetype = filtersplunkproxy&lt;BR /&gt;
blacklist = .gz&lt;/P&gt;

&lt;P&gt;output.conf&lt;BR /&gt;
[tcpout]&lt;BR /&gt;
defaultGroup = splunkindexer_9997&lt;/P&gt;

&lt;P&gt;[tcpout:splunkindexer_9997]&lt;BR /&gt;
server = &lt;SERVER-IP&gt;:9997&lt;/SERVER-IP&gt;&lt;/P&gt;

&lt;P&gt;[tcpout-server://&lt;SERVER-IP&gt;:9997]&lt;BR /&gt;
Please correct me if I am doing something wrong here. &lt;/SERVER-IP&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2014 07:02:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165937#M33663</guid>
      <dc:creator>moohkhol</dc:creator>
      <dc:date>2014-02-26T07:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Setting heavy forwarder for sending only few events which matched with Regx</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165938#M33664</link>
      <description>&lt;P&gt;Asking us to do all the work for you is in my eyes pretty rude. Provide us with info on your nullQueue setup with relevant sections from the conf files you were talking about yourself, then we can have a look and see where you might be going wrong.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2014 07:56:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165938#M33664</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-02-26T07:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Setting heavy forwarder for sending only few events which matched with Regx</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165939#M33665</link>
      <description>&lt;P&gt;I have updated questions with config.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2014 09:12:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165939#M33665</guid>
      <dc:creator>moohkhol</dc:creator>
      <dc:date>2014-02-26T09:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Setting heavy forwarder for sending only few events which matched with Regx</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165940#M33666</link>
      <description>&lt;P&gt;The essential problem lies in the &lt;CODE&gt;[allowtheseevents]&lt;/CODE&gt; transform stanza. The &lt;CODE&gt;FORMAT&lt;/CODE&gt; shall be &lt;CODE&gt;indexQueue&lt;/CODE&gt;, not a  reference to some outputs group.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.2/Forwarding/Routeandfilterdatad#Keep_specific_events_and_discard_the_rest"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.2/Forwarding/Routeandfilterdatad#Keep_specific_events_and_discard_the_rest&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Then you'll need to make your regex include more patterns.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2014 09:58:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165940#M33666</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-02-26T09:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Setting heavy forwarder for sending only few events which matched with Regx</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165941#M33667</link>
      <description>&lt;P&gt;oh, and you need a DEST_KEY as well there;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[allowtheseevents]
REGEX = your regex
FORMAT = indexQueue
DEST_KEY = queue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2014 10:00:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165941#M33667</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-02-26T10:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Setting heavy forwarder for sending only few events which matched with Regx</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165942#M33668</link>
      <description>&lt;P&gt;Thanks Kristian, seems to be working this for me. If you don't mind, Please help me to have generate REGX for below pattern for OR condition with any one of oauth.googleusercontent.com, &lt;BR /&gt;
ssl.gstatic.com, &lt;BR /&gt;
fb.com, &lt;BR /&gt;
twitter.com in anywhere in the events.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2014 10:51:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165942#M33668</guid>
      <dc:creator>moohkhol</dc:creator>
      <dc:date>2014-02-26T10:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Setting heavy forwarder for sending only few events which matched with Regx</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165943#M33669</link>
      <description>&lt;P&gt;&lt;CODE&gt;REGEX = (oauth\.googleusercontent|ssl\.gstatic|fb|twitter)\.com&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Should work.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2014 12:07:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Setting-heavy-forwarder-for-sending-only-few-events-which/m-p/165943#M33669</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-02-26T12:07:43Z</dc:date>
    </item>
  </channel>
</rss>

