Skip to main content
wert_1311
Gold ⭐️
Feb 11, 2019 3:29 AM UTC
Solved

Retention policy for Cloudera Management Services

Hello,

 

How do I change data (logs) retention policy for all Cloudera Management Services  like Service Monitor, Host Monitor and Event Server. My target is to retain data (logs) only last 7 days.

 

Cloudera Enterprise 5.11.1

 

Regards

Wert

 

 

TonyStank
TonyStankAnswer
Gold ⭐️
Feb 14, 2019 5:17 AM UTC

Hello Wert,

 

As per the information provided, you have mentioned free space available.

 

16.09%(free: 3.2 GiB) of free space in /var/lib/cloudera-host-monitor.

 

35.25%(free: 4.9 GiB) of free space in /var/log/cloudera-scm-eventserver.

 

35.81%(free: 5.0 GiB) of free space in /var/log/cloudera-scm-alertpublisher.

 

Thus explaining the alert for low disk space.

 

The data in "/var/lib/cloudera-[host|service]-monitor" is the sum total of the working data for these respective services. Time-series metrics and health data - Time-Series Storage (firehose_time_series_storage_bytes - 10 GB default, 10 GB minimum)

 

My suggestions:

 

1.) Change the default directory("/var/lib/cloudera-[host|service]-monitor") to some other location in your environment with enough space.

 

>> Stop the Service(Service Monitor or Host Monitor).

>> Save your old data and then copy the current directory to the new directory(optional)(Only if you need the old data).

>> Update the Storage Directory configuration option (firehose.storage.base.directory) on the corresponding role configuration page.

>> Start the Service Monitor or Host Monitor.


2.) If the data available in "/var/lib/cloudera-host-monitor" is not of much importance you can remove the data manually. But it's not a recommended step.

 

Your Health statuses will be Unknown or Bad for a short time and you will lose all Charts in the UI while the timeseries store is rebuilt and repopulated (due to the fact that you are deleting ALL the historical metrics). But this shouldn't have an impact on any service.

 

3.) Either add more disk to the cluster or remove unused/unnecessary files available on the disk to free up some disk space.

 

Regards.

9 replies

TonyStank
Gold ⭐️
Gold ⭐️
Feb 11, 2019 1:31 PM UTC

Hello,

 

With "firehose_time_series_storage_bytes" parameter in Cloudera Manager.

 

We can control the approximate amount of disk space dedicated to storing time series and health data. Once the store has reached its maximum size, older data is deleted to make room for newer data. The disk usage is approximate because data is deleted only when the limit is reached.

 

But configuring the log retention based on time seems unlikely. However, you can write a shell script to remove the data every 7 days from the "Service Monitor Storage Directory".

 

By default, the data is stored in /var/lib/cloudera-service-monitor/ on the Service Monitor host. You can change this by modifying the Service Monitor Storage Directory configuration (firehose.storage.base.directory). But this step is not recommended by Cloudera.

Translate
gzigldrum
Gold ⭐️
Gold ⭐️
Feb 11, 2019 2:49 PM UTC

In my understanding the question was not about timeseries storage but actual role log files, is this correct @wert_1311 ? Please note that there are only log file size oriented options available for Cloudera Management Services and cluster services, but no time based options.

Translate