Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Is there an API to set Cloudera Manager monitoring thresholds?

avatar
Explorer

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

1 ACCEPTED SOLUTION

avatar
Super Guru
@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

View solution in original post

2 REPLIES 2

avatar
Super Guru
@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

avatar
Explorer

 

 

Exactly I wanted!

 

Thank you @EricL