Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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

@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.

View solution in original post

4 REPLIES 4

Expert Contributor

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

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.

@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.

Expert Contributor

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

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.