<?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: coldtofrozen stopped working how to troubleshoot in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655585#M9771</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;it's hard to say what is wrong as we cannot see your script.&lt;/P&gt;&lt;P&gt;Are you update splunk and change python to version 3 or how it have gone broken?&lt;/P&gt;&lt;P&gt;How you are calling it?&lt;/P&gt;&lt;P&gt;Basically you could test it with command under splunk user&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;splunk cmd &amp;lt;your script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;This runs it like inside splunk as it runs when it normally works.&lt;/P&gt;&lt;P&gt;If this &amp;nbsp;didn't give you any error then just add debug to your script and try again.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 06:25:08 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2023-08-25T06:25:08Z</dc:date>
    <item>
      <title>How to troubleshoot when coldtofrozen stops working?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655551#M9770</link>
      <description>&lt;P&gt;My coldtofrozen has stopped working. Might be related to python3, but I'm not 100% sure. I've done some tweaking to the coldtofrozen.py #! /opt/splunk/bin python and I've checked other settings, but all seem to be okay.&lt;/P&gt;
&lt;P&gt;Are there any commands or tools I can run to help troubleshoot?&lt;BR /&gt;Where would the errors be logged?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 18:25:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655551#M9770</guid>
      <dc:creator>mikefg</dc:creator>
      <dc:date>2023-08-28T18:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: coldtofrozen stopped working how to troubleshoot</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655585#M9771</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;it's hard to say what is wrong as we cannot see your script.&lt;/P&gt;&lt;P&gt;Are you update splunk and change python to version 3 or how it have gone broken?&lt;/P&gt;&lt;P&gt;How you are calling it?&lt;/P&gt;&lt;P&gt;Basically you could test it with command under splunk user&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;splunk cmd &amp;lt;your script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;This runs it like inside splunk as it runs when it normally works.&lt;/P&gt;&lt;P&gt;If this &amp;nbsp;didn't give you any error then just add debug to your script and try again.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 06:25:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655585#M9771</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-08-25T06:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: coldtofrozen stopped working how to troubleshoot</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655666#M9775</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Thanks for replying.&lt;/P&gt;&lt;P&gt;I had been running splunk 8.2 with it working fine and then upgraded to&amp;nbsp;9.0.3 on CentOS 7. I'm pretty sure 9.0.3 had been working fine as well, but I may be mistaken on the timing.&lt;/P&gt;&lt;P&gt;I did have to do a server name change on the indexers, but the frozen server stayed the same. My indexers write to a frozen server over NFS and nfs exports uses ip address, not name.&lt;/P&gt;&lt;P&gt;My coldtofrozen.py script hasn't changed, but when I run it this is what I get.&lt;/P&gt;&lt;P&gt;[bin]# ./splunk cmd "/opt/splunk/bin/python" "/opt/splunk/etc/peer-apps/archive_app/coldToFrozen.py"&lt;BR /&gt;usage: python coldToFrozenExample.py &amp;lt;bucket_dir_to_archive&amp;gt;&lt;BR /&gt;[bin]#&lt;/P&gt;&lt;P&gt;Full script, edited to remove comments and internal server names.&lt;/P&gt;&lt;P&gt;#!/opt/splunk/bin python&lt;/P&gt;&lt;P&gt;import sys, os, gzip, shutil, subprocess, random, socket&lt;BR /&gt;hname = socket.gethostname()&lt;/P&gt;&lt;P&gt;ARCHIVE_DIR = os.path.join('/mnt/nfs/frozensrv', hname)&lt;/P&gt;&lt;P&gt;def handleNewBucket(base, files):&lt;BR /&gt;&amp;nbsp;&amp;nbsp; print('Archiving bucket: ' + base)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; for f in files:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; full = os.path.join(base, f)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if os.path.isfile(full):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; os.remove(full)&lt;/P&gt;&lt;P&gt;if __name__ == "__main__":&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if len(sys.argv) != 2:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sys.exit('usage: python coldToFrozenExample.py &amp;lt;bucket_dir_to_archive&amp;gt;')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if not os.path.isdir(ARCHIVE_DIR):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; os.mkdir(ARCHIVE_DIR)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except OSError:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; # Ignore already exists errors, another concurrent invokation may have already created this dir&lt;BR /&gt;&amp;nbsp;&amp;nbsp; sys.stderr.write("mkdir warning: Directory '" + ARCHIVE_DIR + "' already exists\n")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; bucket = sys.argv[1]&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if not os.path.isdir(bucket):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sys.exit('Given bucket is not a valid directory: ' + bucket)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; rawdatadir = os.path.join(bucket, 'rawdata')&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if not os.path.isdir(rawdatadir):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sys.exit('No rawdata directory, given bucket is likely invalid: ' + bucket)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; files = os.listdir(bucket)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; journal = os.path.join(rawdatadir, 'journal.gz')&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if os.path.isfile(journal):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handleNewBucket(bucket, files)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; else:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handleOldBucket(bucket, files)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if bucket.endswith('/'):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bucket = bucket[:-1]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; indexname = os.path.basename(os.path.dirname(os.path.dirname(bucket)))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; destdir = os.path.join(ARCHIVE_DIR, indexname, os.path.basename(bucket))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; while os.path.isdir(destdir):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print('Warning: This bucket already exists in the archive directory')&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print('Adding a random extension to this directory...')&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; destdir += '.' + str(random.randrange(10))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; shutil.copytree(bucket, destdir)&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Aug 2023 14:29:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655666#M9775</guid>
      <dc:creator>mikefg</dc:creator>
      <dc:date>2023-08-25T14:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: coldtofrozen stopped working how to troubleshoot</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655690#M9776</link>
      <description>&lt;P&gt;It looks like this line&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if len(sys.argv) != 2:&lt;/P&gt;&lt;P&gt;is where the script runs into trouble. I've also tried&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if len(sys.argv) &amp;lt; 2:&lt;/P&gt;&lt;P&gt;but same results. Not sure what values I need to pass or where to pass them to get the script to proceed. Maybe something in indexes.conf on the coldToFrozenScript line ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; coldToFrozenScript = "/opt/splunk/bin/python" "/opt/splunk/etc/peer-apps/archive_app/coldToFrozen.py"&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 20:39:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655690#M9776</guid>
      <dc:creator>mikefg</dc:creator>
      <dc:date>2023-08-25T20:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: coldtofrozen stopped working how to troubleshoot</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655710#M9777</link>
      <description>&lt;P&gt;When you are running this from cmd line, you must give all needed parameters for it. Check from your script what those are, but if I recall right at least the bucket me it’s path is needed.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Aug 2023 23:04:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655710#M9777</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-08-26T23:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: coldtofrozen stopped working how to troubleshoot</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655875#M9778</link>
      <description>&lt;P&gt;I'm passing a bucket path and getting this error now. Replaced some path values to hide internal names and bucket name.&lt;/P&gt;&lt;P&gt;bash-4.2$ /opt/splunk/bin/splunk cmd "/opt/splunk/bin/python" "/opt/splunk/etc/peer-apps/archive_app/coldToFrozen.py" "/opt/splunk/var/lib/splunk/indexname/db/db_string"&lt;BR /&gt;&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp;&amp;nbsp; File "/opt/splunk/etc/peer-apps/archive_app/coldToFrozen.py", line 51, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handleOldBucket(bucket, files)&lt;BR /&gt;NameError: name 'handleOldBucket' is not defined&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 16:25:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655875#M9778</guid>
      <dc:creator>mikefg</dc:creator>
      <dc:date>2023-08-28T16:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: coldtofrozen stopped working how to troubleshoot</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655882#M9779</link>
      <description>As we don’t know content of your script, we cannot really help you more. I propose that you try to find someone who knows enough Python and you look together what’s wrong in script and fix it.</description>
      <pubDate>Mon, 28 Aug 2023 16:44:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655882#M9779</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-08-28T16:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: coldtofrozen stopped working how to troubleshoot</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655893#M9780</link>
      <description>&lt;P&gt;I posted my script in this thread and it's the sample script, just edited for my environment. It's been working fine for a long time until this issue arose.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 18:35:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655893#M9780</guid>
      <dc:creator>mikefg</dc:creator>
      <dc:date>2023-08-28T18:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: coldtofrozen stopped working how to troubleshoot</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655897#M9781</link>
      <description>&lt;P&gt;I got it working again. I had to recopy the coldtofrozenexample.py and edit for my environment. I was missing some sections from the script.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 20:56:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-to-troubleshoot-when-coldtofrozen-stops-working/m-p/655897#M9781</guid>
      <dc:creator>mikefg</dc:creator>
      <dc:date>2023-08-28T20:56:06Z</dc:date>
    </item>
  </channel>
</rss>

