Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 11-30-2016 05:04 PM
In Ambari 2.2.1 how can I delete old Ambari Server Ops History?
I think that the history of tasks is stored in /var/lib/ambari-agent/data.
Can I simply delete the folder contents?
Created 11-30-2016 06:14 PM
Deleting whole "data" directory is not good. you might face the following kind of error. Because the "data" directory contains some files like "version" (which contains the agent version info),
OSError: [Errno 2] No such file or directory: '/var/lib/ambari-agent/data/status_command.json' INFO 2016-11-30 10:08:54,666 StackVersionsFileHandler.py:107 - Creating stacks versions file at /var/lib/ambari-agent/data/current-stack ERROR 2016-11-30 10:08:54,666 StackVersionsFileHandler.py:48 - Can't read versions file:
However if you want to clean old actions then you can manually delete the following files from the "/var/lib/ambari-agent/data"
-> command-*.json
-> errors-*.txt
-> output-*.txt
.
Created 11-30-2016 06:14 PM
Deleting whole "data" directory is not good. you might face the following kind of error. Because the "data" directory contains some files like "version" (which contains the agent version info),
OSError: [Errno 2] No such file or directory: '/var/lib/ambari-agent/data/status_command.json' INFO 2016-11-30 10:08:54,666 StackVersionsFileHandler.py:107 - Creating stacks versions file at /var/lib/ambari-agent/data/current-stack ERROR 2016-11-30 10:08:54,666 StackVersionsFileHandler.py:48 - Can't read versions file:
However if you want to clean old actions then you can manually delete the following files from the "/var/lib/ambari-agent/data"
-> command-*.json
-> errors-*.txt
-> output-*.txt
.
Created 11-30-2016 06:28 PM
Thanks. Yea I meant the contents (text files) not the directory. This makes sense. Thanks I will try that