Skip to main content
kal
Silver ⭐️⭐️
July 9, 2019
Solved

Could I delete /var/lib/cloudera-service/host-monitor files?

Hi, I want to delete the /var/lib/ cloudera-service/host-monitor files. But when I search everyone is saying its not best to delete these files. But 90% of space is used by them. I know I will loose the chart data history, that wont be a problem. If I delete them, will my production cluster can work normally like before?If not what errors will I get? We are using CDH 5.10.0 parcles. I need your insight on this issue. 

bgooley
bgooleyAnswer
Gold ⭐️
July 9, 2019

@kal,

 

Yup, you can stop Service Monitor and Host Monitor and then remove the contents of cloudera-host-monitor and cloudera-service-monitor directories.

When you restart Servcie and Host Monitor, new indexes will be start from scratch.

 

You will only lose the historical information.

4 replies

bgooley
Gold ⭐️
Gold ⭐️
July 9, 2019

Hello @kal ,

 

First, we need to be sure about the directory to which you are referring.

You mentioned /var/lib/cloudera-service/host-monitor , but that seems unconventional.

If we are talking about the Cloudera Host Monitor Host Monitor Storage Directory, that is usually:

 

/var/lib/cloudera-host-monitor

 

If you are, indeed, referring to the directory that is defined in the Cloudera Management Service "Host Monitor Storage Directory" configuration parameter, then that is where the Host Monitor stores information collected about hosts.  Host Monitor pulls from indexes in that directory in order to provide information for Host Charts and historical data.  CDH does not depend on it so it will not impact your services.

 

If you remove the data in /var/lib/cloudera-host-monitor, then you will not have access to historical host information and your charts will start from the point the Host Monitor is restarted.

 

If you are OK with that, then you can do the following:

 

  1. Stop the Host Monitor (via Cloudera Manager)
  2. move all the contents (recursively) out of /var/lib/cloudera-host-monitor
  3. Start the Host Monitor (via Cloudera Manager)

If everything looks OK to you at that point, you could go ahead and delete the files you moved out.

 

In short, you can delete the host monitor storage files without impacting your cluster.  Host Monitor is used for charts and historical reference, but it will start from scratch if you delete all the files.

Ben

Translate
kal
kalAuthor
Silver ⭐️⭐️
July 9, 2019

Hello @bgooley 

 

I am talking about /var/lib/cloudera-host-monitor and /var/lib/cloudera-service-monitor. They occupied almost 20GB of the space and I want to delete those files. By below screenshot you will know what these folders contain.Screen Shot 2019-07-09 at 1.55.36 PM.png

I need space, if charts history is gone I am fine. Thank you.

Translate
bgooley
Gold ⭐️
bgooleyAnswer
Gold ⭐️
July 9, 2019

@kal,

 

Yup, you can stop Service Monitor and Host Monitor and then remove the contents of cloudera-host-monitor and cloudera-service-monitor directories.

When you restart Servcie and Host Monitor, new indexes will be start from scratch.

 

You will only lose the historical information.

Translate