<?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 coldToFrozenScript not working in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23672#M3734</link>
    <description>&lt;P&gt;Below is my indexes.conf file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;defaultDatabase = main

[main]

homePath= $SPLUNK_DB\defaultdb\db
coldPath = $SPLUNK_DB\defaultdb\colddb
thawedPath = $SPLUNK_DB\defaultdb\thawedb
maxDataSize = 5     
maxHotBuckets = 1                        
maxWarmDBCount = 1
frozenTimePeriodInSecs = 60
rotatePeriodInSecs = 60
coldToFrozenScript = WindowsCompressedExport.bat "$DIR"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have the fields set to a minimum so I can see if this works.&lt;/P&gt;

&lt;P&gt;Also here is my WindowsCompressedExport.bat file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;set dest_base=C:\Security\splunk\

set source_path=%1
set source_base=%~dp1
set source_leaf=%~nx1
set dest_final=%dest_base%\%source_leaf%

#echo commands....

for %%i iin (%1\*.tsidx) do splunk-compresstool.exe -M "%%i"

mkdir %dest_final%

xcopy %1 %dest_final% /E /I /C /Y
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any clue as to what may be the issue??&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jan 2011 01:44:37 GMT</pubDate>
    <dc:creator>sgramenopoulos</dc:creator>
    <dc:date>2011-01-11T01:44:37Z</dc:date>
    <item>
      <title>coldToFrozenScript not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23672#M3734</link>
      <description>&lt;P&gt;Below is my indexes.conf file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;defaultDatabase = main

[main]

homePath= $SPLUNK_DB\defaultdb\db
coldPath = $SPLUNK_DB\defaultdb\colddb
thawedPath = $SPLUNK_DB\defaultdb\thawedb
maxDataSize = 5     
maxHotBuckets = 1                        
maxWarmDBCount = 1
frozenTimePeriodInSecs = 60
rotatePeriodInSecs = 60
coldToFrozenScript = WindowsCompressedExport.bat "$DIR"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have the fields set to a minimum so I can see if this works.&lt;/P&gt;

&lt;P&gt;Also here is my WindowsCompressedExport.bat file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;set dest_base=C:\Security\splunk\

set source_path=%1
set source_base=%~dp1
set source_leaf=%~nx1
set dest_final=%dest_base%\%source_leaf%

#echo commands....

for %%i iin (%1\*.tsidx) do splunk-compresstool.exe -M "%%i"

mkdir %dest_final%

xcopy %1 %dest_final% /E /I /C /Y
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any clue as to what may be the issue??&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2011 01:44:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23672#M3734</guid>
      <dc:creator>sgramenopoulos</dc:creator>
      <dc:date>2011-01-11T01:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: coldToFrozenScript not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23673#M3735</link>
      <description>&lt;P&gt;Your script has the following line:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;for %%i iin (%1\*.tsidx) do splunk-compresstool.exe -M "%%i"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is the "iin" actually in the script? If so, that's a typo, it should read "in". This could cause your script to fail.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2011 02:22:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23673#M3735</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2011-01-11T02:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: coldToFrozenScript not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23674#M3736</link>
      <description>&lt;P&gt;(not a windows expert, so YMMV)&lt;/P&gt;

&lt;P&gt;I would start by making sure Splunk "sees" your coldToFrozenScript argument.  The btool diagnostic command can help, something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;bin/splunk cmd btool --debug indexes list main
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will dump the "merged" (as Splunk would see/use it) configuration stanzas so you can be sure your stuff is being applied.  This is a good to check to make sure you got your CamelCase right.  (In your example, it looks like you have it correct, but I've seen folks get it wrong before.)&lt;/P&gt;

&lt;P&gt;I'm also not sure about the "$DIR" part - it seems like it should work, but the quoting makes me a little nervous.  If the path does not contain spaces, perhaps take the quotes off entirely - or as a test, hard-code the export path.&lt;/P&gt;

&lt;P&gt;Also, as a troubleshooting step, you could have your script create a dummy file in a well known place (like, say, C:\temp) -- then you have some proof as to whether or not your script got called at all.&lt;/P&gt;

&lt;P&gt;Finally, in your splunkd.log you should see messages similar to these - which fire on the beginning and successful end of a freeze operation.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;01-10-2011 08:46:16.003 INFO  BucketMover - will attempt to freeze: /opt/splunk/var/lib/splunk/firewalls/db/db_1286891137_1286854127_366 because frozenTimePeriodInSecs=7776000 exceeds difference between now=1294667176 and latest=1286891137
01-10-2011 08:46:39.234 INFO  BucketMover - AsyncFreezer freeze succeeded for /opt/splunk/var/lib/splunk/firewalls/db/db_1286891137_1286854127_366
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jan 2011 02:23:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23674#M3736</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-01-11T02:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: coldToFrozenScript not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23675#M3737</link>
      <description>&lt;P&gt;Yes this is typo.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2011 02:31:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23675#M3737</guid>
      <dc:creator>sgramenopoulos</dc:creator>
      <dc:date>2011-01-11T02:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: coldToFrozenScript not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23676#M3738</link>
      <description>&lt;P&gt;Just a typo on answers or in your script? If in your script, you should fix it...&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2011 02:35:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23676#M3738</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2011-01-11T02:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: coldToFrozenScript not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23677#M3739</link>
      <description>&lt;P&gt;btool returned what I had set in the .conf file.&lt;/P&gt;

&lt;P&gt;I referenced the Admin guide on usage of the ColdToFrozenScript as noted here:  &lt;/P&gt;

&lt;P&gt;coldToFrozenScript = &lt;SCRIPT&gt;&amp;lt;br&amp;gt;
&amp;amp;lt;$script&amp;amp;gt; path is relative to $SPLUNK_HOME/bin, and must be in that directory or a subdirectory.&amp;lt;br&amp;gt;
* WINDOWS users use this notation:&amp;lt;br&amp;gt;
coldToFrozenScript = &amp;lt;script&amp;gt; &amp;amp;quot;$DIR&amp;amp;quot;&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;Thanks for your help!&amp;lt;/p&amp;gt;&lt;/SCRIPT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2011 02:39:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23677#M3739</guid>
      <dc:creator>sgramenopoulos</dc:creator>
      <dc:date>2011-01-11T02:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: coldToFrozenScript not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23678#M3740</link>
      <description>&lt;P&gt;Turns out it was the trailing "\" for the dest_base field in the WindowsCompressedExport.bat file.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2011 03:09:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/coldToFrozenScript-not-working/m-p/23678#M3740</guid>
      <dc:creator>sgramenopoulos</dc:creator>
      <dc:date>2011-01-11T03:09:19Z</dc:date>
    </item>
  </channel>
</rss>

