Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How do you delete old Ambari Operations History

Solved Go to solution

How do you delete old Ambari Operations History

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?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How do you delete old Ambari Operations History

@William Gonzalez

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

.

2 REPLIES 2

Re: How do you delete old Ambari Operations History

@William Gonzalez

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

.

Highlighted

Re: How do you delete old Ambari Operations History

Thanks. Yea I meant the contents (text files) not the directory. This makes sense. Thanks I will try that

Don't have an account?
Coming from Hortonworks? Activate your account here