<?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: Overwrite index on each local csv file data pulling in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554401#M91878</link>
    <description>&lt;P&gt;I´m monitoring an csv file continously.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jun 2021 06:13:45 GMT</pubDate>
    <dc:creator>cpm003</dc:creator>
    <dc:date>2021-06-04T06:13:45Z</dc:date>
    <item>
      <title>Overwrite index on each local csv file data pulling</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554290#M91855</link>
      <description>&lt;P&gt;I have a need to overwrite an index every time a continously monitored local csv file is modified.&lt;/P&gt;&lt;P&gt;This index should only have the total number of entries in the csv file at any given time, without being incremental.&lt;/P&gt;&lt;P&gt;How could I achieve it?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:20:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554290#M91855</guid>
      <dc:creator>cpm003</dc:creator>
      <dc:date>2021-06-03T13:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite index on each local csv file data pulling</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554300#M91860</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/186287"&gt;@cpm003&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the easier way to store the CSV data is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a lookup based on this csv file&lt;/LI&gt;&lt;LI&gt;If the csv file is very huge consider to use a KV_STORE&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Anyway, If for you is mandatory collect csv events on one Index, you need to consider to delete the data on the index everytime (you can set retention 1 day, or schedule a search with delete options) and schedule a scripted input (run scheduling 1 time per day) to recollect the data day by day.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:59:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554300#M91860</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-06-03T13:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite index on each local csv file data pulling</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554305#M91861</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222210"&gt;@aasabatini&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it in this window where to set the retention? Any implications that I should consider when establishing retention? (not counting the obvious removal of the data from the index?)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cpm003_0-1622729195784.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14456i6ED6CA955AD55D2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cpm003_0-1622729195784.png" alt="cpm003_0-1622729195784.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 14:09:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554305#M91861</guid>
      <dc:creator>cpm003</dc:creator>
      <dc:date>2021-06-03T14:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite index on each local csv file data pulling</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554326#M91863</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/186287"&gt;@cpm003&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the retention is configured on the indexes.conf file&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[main]
frozenTimePeriodInSecs = 15552000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;you need to set the data retention in seconds&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.0/Indexer/Setaretirementandarchivingpolicy" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.0/Indexer/Setaretirementandarchivingpolicy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if this reply help, please confirm solution or add karma points&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 15:11:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554326#M91863</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-06-03T15:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite index on each local csv file data pulling</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554393#M91876</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222210"&gt;@aasabatini&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After setting the retention for the index to 20 seconds I get the index to empty but only once, after reloading data in it they remain as you see in the capture since yesterday.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cpm003_0-1622785503160.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14464i6C9830D18416FEB7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cpm003_0-1622785503160.png" alt="cpm003_0-1622785503160.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 05:49:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554393#M91876</guid>
      <dc:creator>cpm003</dc:creator>
      <dc:date>2021-06-04T05:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite index on each local csv file data pulling</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554398#M91877</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/186287"&gt;@cpm003&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I know whats inputs method you used?&lt;/P&gt;&lt;P&gt;script or monitor?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 06:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554398#M91877</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-06-04T06:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite index on each local csv file data pulling</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554401#M91878</link>
      <description>&lt;P&gt;I´m monitoring an csv file continously.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 06:13:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554401#M91878</guid>
      <dc:creator>cpm003</dc:creator>
      <dc:date>2021-06-04T06:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite index on each local csv file data pulling</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554409#M91879</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/186287"&gt;@cpm003&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as I suggested, you need to create a scripted input&amp;nbsp;&lt;/P&gt;&lt;P&gt;script example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#!/bin/bash
# read csv file
cat  /[path]/[name].csv&lt;/LI-CODE&gt;&lt;P&gt;set to run the script only once time per day and set the retention only for one day&lt;/P&gt;&lt;P&gt;&lt;A href="https://helgeklein.com/blog/2015/03/splunk-scripted-input-secrects/" target="_blank"&gt;https://helgeklein.com/blog/2015/03/splunk-scripted-input-secrects/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 06:45:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554409#M91879</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-06-04T06:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite index on each local csv file data pulling</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554411#M91880</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222210"&gt;@aasabatini&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´ll check right now&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 06:50:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554411#M91880</guid>
      <dc:creator>cpm003</dc:creator>
      <dc:date>2021-06-04T06:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite index on each local csv file data pulling</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554417#M91883</link>
      <description>&lt;P&gt;Hello Again&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222210"&gt;@aasabatini&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Created an script to read local csv and index their content on an index called "cduinventario" executed each 10seconds&lt;/P&gt;&lt;P&gt;Configured retention at the end of /opt/splunk/etc/system/default/indexes.conf with:&lt;/P&gt;&lt;P&gt;[cduinventario]&lt;BR /&gt;frozenTimePeriodInSecs = 5&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;Index doesn´t stop growing each script reads csv file, retention is not working as expected.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 07:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554417#M91883</guid>
      <dc:creator>cpm003</dc:creator>
      <dc:date>2021-06-04T07:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite index on each local csv file data pulling</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554418#M91884</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/186287"&gt;@cpm003&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"run the script only once time per day"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if you scheduling the script run each 10 seconds is normal the index increase continuously.&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;script run once time per day&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;retention set on 8400 seconds (1 day)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;if you need to monitor continuously your csv, I suggested to use lookup or kvstore method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;hope can help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Alessandro&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 07:10:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overwrite-index-on-each-local-csv-file-data-pulling/m-p/554418#M91884</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-06-04T07:10:12Z</dc:date>
    </item>
  </channel>
</rss>

