Skip to main content
Kevin_Z
Silver ⭐️⭐️
Nov 7, 2019 4:12 AM UTC
Solved

Is there an API to set Cloudera Manager monitoring thresholds?

I'd like to use API to set CM monitoring thresholds so I can deploy the modified ones on other CMs.  For example, to set 'Cloudera Manager Agent Log Directory Free Space Monitoring Absolute Thresholds' Warning at 5GB and Critical to 2GB instead of using the default values.

 

I am not sure with  API to use by looking at  this webpage: https://archive.cloudera.com/cm6/6.0.0/generic/jar/cm_api/apidocs/index.html

 

Would anyone provide some help?

 

Thanks,


Kevin

EricL
EricLAnswer
Platinum ⭐️⭐️
Nov 7, 2019 5:35 AM UTC
@Kevin_Z

Try this one:
https://archive.cloudera.com/cm6/6.0.0/generic/jar/cm_api/apidocs/resource_AllHostsResource.html

And the config name is "host_agent_log_directory_free_space_absolute_thresholds", set the value and update it via PUT.

Sample payload like below:

"items" : [ {
"name" : "host_agent_log_directory_free_space_absolute_thresholds",
"value" : "{\"warning\":3221225472,\"critical\":1073741824}",
"sensitive" : false
}]

Hope this can help.

Cheers
Eric

2 replies

EricL
Platinum ⭐️⭐️
EricLAnswer
Platinum ⭐️⭐️
Nov 7, 2019 5:35 AM UTC
@Kevin_Z

Try this one:
https://archive.cloudera.com/cm6/6.0.0/generic/jar/cm_api/apidocs/resource_AllHostsResource.html

And the config name is "host_agent_log_directory_free_space_absolute_thresholds", set the value and update it via PUT.

Sample payload like below:

"items" : [ {
"name" : "host_agent_log_directory_free_space_absolute_thresholds",
"value" : "{\"warning\":3221225472,\"critical\":1073741824}",
"sensitive" : false
}]

Hope this can help.

Cheers
Eric
Translate
Kevin_Z
Kevin_ZAuthor
Silver ⭐️⭐️
Nov 7, 2019 4:43 PM UTC

 

 

Exactly I wanted!

 

Thank you @EricL 

Translate