<?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: duplicate events showing up in search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/duplicate-events-showing-up-in-search/m-p/43258#M10187</link>
    <description>&lt;P&gt;Perhaps you are cloning each event to each indexer, rather than splitting and load-balancing them between the indexers?&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2011 07:05:47 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2011-07-15T07:05:47Z</dc:date>
    <item>
      <title>duplicate events showing up in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/duplicate-events-showing-up-in-search/m-p/43257#M10186</link>
      <description>&lt;P&gt;We are running a rails application and are using splunk to parse our rails logs. We have a search-head and 2 indexers. On the indexers, I have added the following to /opt/splunk/etc/apps/search/local/props.conf to ensure that the logging for each rails request is are parsed as a single event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[(?:::){0}*rails]
LINE_BREAKER = ([\r\n]).* [\r\n]+Started (POST|GET)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Each application server runs a forwarder. The rails log for each project is added using the following type of command, so that the source types match the pattern in the above stanza.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/splunkforwarder/bin/splunk add monitor -source '/home/builder/abitlucky/web/luckyonrails/log/production.log' -sourcetype project1-rails
/opt/splunkforwarder/bin/splunk add monitor -source '/home/builder/abitlucky/web/luckyonrails/log/production.log' -sourcetype project2-rails
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The issue is that I am seeing every single rails request duplicated in the search application. If I click on 'Show Source' for both of the events for a duplicated request, I get strange results. For some cases, it highlights the original request in the source for one of the events and a completely different request in the source for the duplicate (i.e., the request it shows as the source does not match the request I clicked 'Show Source' for). In other cases, it highlights the original request in the source for one of the events, and then highlights a second listing of that request in the source for the second event. In these cases, I can see the request repeated in the source it is showing me. However, if I go back to the original log, the request only shows up once, so the repeated request in the source Splunk is showing me is a phantom/fake request that was not in the original log for these cases.&lt;/P&gt;

&lt;P&gt;I'm not sure if that makes sense without actually seeing what I am referring to, but I explained it as best I could. Has anyone seen this behavior? What could be causing it? &lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2011 00:54:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/duplicate-events-showing-up-in-search/m-p/43257#M10186</guid>
      <dc:creator>builder</dc:creator>
      <dc:date>2011-07-15T00:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate events showing up in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/duplicate-events-showing-up-in-search/m-p/43258#M10187</link>
      <description>&lt;P&gt;Perhaps you are cloning each event to each indexer, rather than splitting and load-balancing them between the indexers?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2011 07:05:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/duplicate-events-showing-up-in-search/m-p/43258#M10187</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-07-15T07:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate events showing up in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/duplicate-events-showing-up-in-search/m-p/43259#M10188</link>
      <description>&lt;P&gt;On my forwarder machines, I am adding the indexers using the commands:&lt;/P&gt;

&lt;P&gt;/opt/splunkforwarder/bin/splunk add forward-server splunki1.myhost.com:9997 &lt;/P&gt;

&lt;P&gt;/opt/splunkforwarder/bin/splunk add forward-server splunki2.myhost.com:9997&lt;/P&gt;

&lt;P&gt;I believe that should properly load balance them, no?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2011 22:15:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/duplicate-events-showing-up-in-search/m-p/43259#M10188</guid>
      <dc:creator>builder</dc:creator>
      <dc:date>2011-07-15T22:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate events showing up in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/duplicate-events-showing-up-in-search/m-p/43260#M10189</link>
      <description>&lt;P&gt;I got an answer from a splunk employee on this. I had originally been instructed to add my load balanced indexers using the following commands, as mentioned in my previous comment:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/splunkforwarder/bin/splunk add forward-server splunki1.myhost.com:9997
/opt/splunkforwarder/bin/splunk add forward-server splunki2.myhost.com:9997
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That resulted in the following outputs.conf file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout:splunki1.myhost.com_9997]
server = splunki1.myhost.com:9997

[tcpout-server://splunki1.myhost.com:9997]

[tcpout]
defaultGroup = splunki1.myhost.com_9997,splunki2.myhost.com_9997
disabled = false

[tcpout:splunki2.myhost.com_9997]
server = splunki2.myhost.com:9997

[tcpout-server://splunki2.myhost.com:9997]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Apparently that results in the events being sent independently to both indexers, rather than being load balanced. With the splunk employee's help, I have manually updated my outputs.conf to the following and I am no longer getting duplicate events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout:splunki]
server = splunki1.myhost.com:9997,splunki2.myhost.com:9997

[tcpout]
defaultGroup = splunki
disabled = false
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Aug 2011 18:43:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/duplicate-events-showing-up-in-search/m-p/43260#M10189</guid>
      <dc:creator>builder</dc:creator>
      <dc:date>2011-08-01T18:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate events showing up in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/duplicate-events-showing-up-in-search/m-p/43261#M10190</link>
      <description>&lt;P&gt;This turned out to be the case. See my answer below for the full details (I posted it as a separate answer instead of a comment so that I could do formatting).&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2011 18:48:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/duplicate-events-showing-up-in-search/m-p/43261#M10190</guid>
      <dc:creator>builder</dc:creator>
      <dc:date>2011-08-01T18:48:26Z</dc:date>
    </item>
  </channel>
</rss>

