- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Retention policy for Cloudera Management Services
- Labels:
-
Cloudera Manager
Created 02-10-2019 07:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created 02-13-2019 09:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created 02-11-2019 05:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created 02-11-2019 06:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created 02-11-2019 07:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Tony,
Thank you for your reply, since there is no built-in mechanism to delete logs after 7 days I guess the best option for us, would be to adjust "firehose_time_series_storage_bytes" property. have some questions around the same here:
- Currently the Time series storage is set at 10GiB for Host Monitor & Service Monitor (screenshot attached), I presume this is the defaullt setting, can this be lowered? if yes, then will lowering this to example 5GiB get rid of the data logs and once the the status is green can we change it back to 10GiB.
- As mentioend 'data is deleted only when the limit has reached', then is that limit 10Gib? will the oldest data /logs will be deleted after this threshold of 10 GiB ?
- Changing the parameters (as mentioned in point 1) require me to restart the Host Monitor & Service Monitor roles?
Thanks
Wert
Created 02-12-2019 12:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To answer your questions:
- The Time Series Storage limit can be configured but the minimum value is 10 Gb.
- Data is deleted from time series when this limit is reached.
- A change for this configuration parameter requires a restart of the role instance.
Please note that this is all about time series data which will be used to populate the charts in Cloudera Manager with data. This will not affect the log file size for the roles, e.g. in /var/log/cloudera-scm-firehose/ directory, as you mention /logs again in your recent post.
Created 02-12-2019 09:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Gzigldrum,
Thanks for your reply,my issue is that health status of Host Monitor Health, Event Server Health & Alert Publisher Health shows as Bad (Red) due to directory free space issue, is there anything I can check or change to fix this ? Will deleting the logs from the location you have mentioned in the previous location help us in reducing the alerts and bring us in Green zone.
Appreciate any help in this regard.
Regards
Wert
Created 02-13-2019 12:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Likely this is for the /var mountpoint, in that case please confirm on actual disk usage with commands
# df -h /var
# du -hs /var/*
Created on 02-13-2019 07:39 PM - edited 02-13-2019 09:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gzigldrum,
Following is the details requested, unfortunately I am unablle to run (du -hs /var/*) seems I do not have required permissions.
Host Monitor Error
Host Monitor Storage Directory Free Space:
This role's Host Monitor Storage Directory is on a filesystem with less than 5.0 GiB of its space free. /var/lib/cloudera-host-monitor (free: 3.2 GiB (16.09%), capacity: 20.0 GiB)
***********************************
Event Server Error
Log Directory Free Space :
This role's Log Directory is on a filesystem with less than 5.0 GiB of its space free. /var/log/cloudera-scm-eventserver (free: 4.9 GiB (35.25%), capacity: 14.0 GiB)
***********************************
Alert Publisher Error
Log Directory Free Space :
This role's Log Directory is on a filesystem with less than 10.0 GiB of its space free. /var/log/cloudera-scm-alertpublisher (free: 5.0 GiB (35.81%), capacity: 14.0 GiB
Created 02-13-2019 09:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created 02-13-2019 10:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply, appericate all the hep provided by you and Gzigldrum
Regards
Wert
