<?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 to skip reindexing events of manually edited JSON in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323856#M60296</link>
    <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;

&lt;P&gt;I need to test folder monitoring inputs with source in JSON format. &lt;BR /&gt;
Since I'm not able to test it with an application right now, I'm adding  JSON events to the file manually.. After this change all previous events are getting indexed again. &lt;BR /&gt;
What configuration will help to avoid this behavior? I've tried&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;followTail = 1 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but this did not help.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2017 21:17:49 GMT</pubDate>
    <dc:creator>evelenke</dc:creator>
    <dc:date>2017-04-10T21:17:49Z</dc:date>
    <item>
      <title>How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323856#M60296</link>
      <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;

&lt;P&gt;I need to test folder monitoring inputs with source in JSON format. &lt;BR /&gt;
Since I'm not able to test it with an application right now, I'm adding  JSON events to the file manually.. After this change all previous events are getting indexed again. &lt;BR /&gt;
What configuration will help to avoid this behavior? I've tried&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;followTail = 1 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but this did not help.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 21:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323856#M60296</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2017-04-10T21:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323857#M60297</link>
      <description>&lt;P&gt;By default, Splunk does followTail only for monitor data inputs. Does the update that you make is within first 256 characters of the file? &lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 21:36:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323857#M60297</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-10T21:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323858#M60298</link>
      <description>&lt;P&gt;No, it's more - each event has approx. 400 chars&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 21:59:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323858#M60298</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2017-04-10T21:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323859#M60299</link>
      <description>&lt;P&gt;Can you share the entire config for this input?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;./splunk btool inputs list --debug&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;look for the stanza for this particular input and share here!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 23:06:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323859#M60299</guid>
      <dc:creator>mattymo</dc:creator>
      <dc:date>2017-04-10T23:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323860#M60300</link>
      <description>&lt;P&gt;sure: &lt;/P&gt;

&lt;P&gt;[monitor://mypath*.json]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
host = myhost&lt;BR /&gt;
sourcetype = my_json_test1&lt;BR /&gt;
source = my_json_test1&lt;BR /&gt;
index = my_json_test1&lt;/P&gt;

&lt;H1&gt;alwaysOpenFile = 1&lt;/H1&gt;

&lt;P&gt;followTail=1&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:37:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323860#M60300</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2020-09-29T13:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323861#M60301</link>
      <description>&lt;P&gt;It is the &lt;CODE&gt;followTail = 1&lt;/CODE&gt; that is doing it; delete this or set to &lt;CODE&gt;0&lt;/CODE&gt; instead.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 23:11:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323861#M60301</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-10T23:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323862#M60302</link>
      <description>&lt;P&gt;The same,  actually I've added followTail=1 with hope this will resolve it.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 23:38:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323862#M60302</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2017-04-10T23:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323863#M60303</link>
      <description>&lt;P&gt;windows or nix?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 23:44:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323863#M60303</guid>
      <dc:creator>mattymo</dc:creator>
      <dc:date>2017-04-10T23:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323864#M60304</link>
      <description>&lt;P&gt;windows 10&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 23:53:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323864#M60304</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2017-04-10T23:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323865#M60305</link>
      <description>&lt;P&gt;The same on Linux.   &lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 12:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323865#M60305</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2017-04-11T12:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323866#M60306</link>
      <description>&lt;P&gt;So the problem was caused with square brackets &lt;CODE&gt;[]&lt;/CODE&gt; in the beginning and the end of file. &lt;BR /&gt;
Without these Splunk do not reindex all events included.&lt;/P&gt;

&lt;P&gt;Thanks to everyone for assistance. &lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 14:45:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323866#M60306</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2017-04-11T14:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323867#M60307</link>
      <description>&lt;P&gt;ah nice! Glad to see you got it sorted!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 20:01:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323867#M60307</guid>
      <dc:creator>mattymo</dc:creator>
      <dc:date>2017-04-11T20:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323868#M60308</link>
      <description>&lt;P&gt;I'll try to continue here as my troubles didn't finish yet.&lt;/P&gt;

&lt;P&gt;So I need to remove those square brackets and let Splunk recognize this type like a usual JSON ({.....}). I've applied transforms like this:&lt;/P&gt;

&lt;P&gt;[jsontest_null]&lt;BR /&gt;
REGEX = ^([|)([^]$]+)(]|$)&lt;BR /&gt;
FORMAT = $2&lt;BR /&gt;
DEST_KEY = _raw&lt;/P&gt;

&lt;P&gt;But even with this the events still get reindexed with adding new records to the file.&lt;BR /&gt;
Is there any way to escape this?&lt;BR /&gt;
 My props.conf:&lt;/P&gt;

&lt;P&gt;LINE_BREAKER = (,)({"action")&lt;BR /&gt;
AUTO_KV_JSON = true&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;/P&gt;

&lt;P&gt;Sample fake events (&lt;STRONG&gt;always separated by comma)&lt;/STRONG&gt;:&lt;BR /&gt;
[{"action":{"date":"2017-03-27T07:56:14","name":"open","host":"host1","user":{"id":"27","name":"Doe, Joe","class":"5"},"obj":{"file":"3","name":"3","version":"1","size":"2963","type":"1","room":{"name":"room1","id":"room1"},"subject":"m5","fab":"a1","dir":"m5-a2"}}},{"action":{"date":"2017-03-27T07:56:15","name":"open","host":"host2","user":{"id":"27","name":"Doe, Joe","class":"6"},"obj":{"file":"3","name":"3","version":"1","size":"2433","type":"2","room":{"name":"room1","id":"room1"},"subject":"m5","fab":"a1","dir":"m5-a2"}}}]&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:38:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323868#M60308</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2020-09-29T13:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323869#M60309</link>
      <description>&lt;P&gt;Thanks, but I think it's kind of bug, although it may be rare output type with '[]' but it happens... &lt;BR /&gt;
Please also check my comment below , don't know if I need to create new topic for this.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 23:14:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323869#M60309</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2017-04-11T23:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323870#M60310</link>
      <description>&lt;P&gt;i don't believe its a bug, i thiink its more to do with how splunk reads a json array.  If u are using json extractions, an array will be one event, so if you are hand changing an event, it will read all of it because it is a "new" event. at least thats what I think is happening&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 10:38:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323870#M60310</guid>
      <dc:creator>mattymo</dc:creator>
      <dc:date>2017-04-12T10:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323871#M60311</link>
      <description>&lt;P&gt;Yes, I also have similar thoughts. &lt;BR /&gt;
Looking for a workaround, the transformation I've provided below doesn't work, unfortunately.  &lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 11:58:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323871#M60311</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2017-04-12T11:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323872#M60312</link>
      <description>&lt;P&gt;you just need to get the linebreaker right. regex101.com is my best friend for that. &lt;/P&gt;

&lt;P&gt;Check out this answer to see how other users did a similar thing&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/511589/how-to-configure-line-breaking-for-my-sample-json.html#answer-511700"&gt;https://answers.splunk.com/answers/511589/how-to-configure-line-breaking-for-my-sample-json.html#answer-511700&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 13:30:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323872#M60312</guid>
      <dc:creator>mattymo</dc:creator>
      <dc:date>2017-04-12T13:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip reindexing events of manually edited JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323873#M60313</link>
      <description>&lt;P&gt;Thank you, that was resolved. Always use regex101 but sometimes Splunk needs something else)&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2017 13:10:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-skip-reindexing-events-of-manually-edited-JSON/m-p/323873#M60313</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2017-04-22T13:10:42Z</dc:date>
    </item>
  </channel>
</rss>

