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 can we delete old data of Ambari Metric server?

Solved Go to solution
Highlighted

How can we delete old data of Ambari Metric server?

Expert Contributor

We implemented ambari-metrics-collector in embedded mode. Now, it is taking more disk space under /hadoop/var/lib/ambari-metrics-collector/hbase/data/default. How can we delete prior data in the metrics collector? What are the precautions to be taken while deleting directories in the above location. Which directories need to be untouched? I saw Metric Aggregator took 2.8GB,Metric Record monitor took 1.4 GB.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How can we delete old data of Ambari Metric server?

@Ram D

See this https://cwiki.apache.org/confluence/display/AMBARI/Configuration

Metric Collector - ams-site - Configuration details

  • Modifying retention interval for time aggregated data. Refer to Aggregation section for more information on aggregation: API spec (Note: In Ambari 2.0 and 2.1, the Phoenix version does not support Alter TTL queries. So these can be modified from the UI, only at install time. Please refer to Known Issues section for workaround.)
    Property Default value Description
    timeline.metrics.host.aggregator.daily.ttl31536000Host based daily resolution data purge interval. Default is 1 year.
    timeline.metrics.cluster.aggregator.minute.ttl2592000Cluster wide minute resolution data purge interval. Default is 30 days.
    timeline.metrics.cluster.aggregator.hourly.ttl31536000Cluster wide hourly resolution data purge interval. Default is 1 year.
    timeline.metrics.cluster.aggregator.daily.ttl63072000Cluster wide daily resolution data purge interval. Default is 2 years.
4 REPLIES 4

Re: How can we delete old data of Ambari Metric server?

Expert Contributor

Is there any parameter to set auto delete old metrics based on time frame?

Re: How can we delete old data of Ambari Metric server?

Mentor

@Ram D

recommendation is to migrate to distributed mode and then you can clean up old directories. There's also time to live properties you can find them here this is Hortonworks documentation for TTL settings.

Re: How can we delete old data of Ambari Metric server?

@Ram D

See this https://cwiki.apache.org/confluence/display/AMBARI/Configuration

Metric Collector - ams-site - Configuration details

  • Modifying retention interval for time aggregated data. Refer to Aggregation section for more information on aggregation: API spec (Note: In Ambari 2.0 and 2.1, the Phoenix version does not support Alter TTL queries. So these can be modified from the UI, only at install time. Please refer to Known Issues section for workaround.)
    Property Default value Description
    timeline.metrics.host.aggregator.daily.ttl31536000Host based daily resolution data purge interval. Default is 1 year.
    timeline.metrics.cluster.aggregator.minute.ttl2592000Cluster wide minute resolution data purge interval. Default is 30 days.
    timeline.metrics.cluster.aggregator.hourly.ttl31536000Cluster wide hourly resolution data purge interval. Default is 1 year.
    timeline.metrics.cluster.aggregator.daily.ttl63072000Cluster wide daily resolution data purge interval. Default is 2 years.

Re: How can we delete old data of Ambari Metric server?

Expert Contributor

What is the recommended value instead of 1 year for host and 1 year for cluster?

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