Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Is there an API to set Cloudera Manager monitoring thresholds?

Solved Go to solution

Is there an API to set Cloudera Manager monitoring thresholds?

New Contributor

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

Accepted Solutions
Highlighted

Re: Is there an API to set Cloudera Manager monitoring thresholds?

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
2 REPLIES 2
Highlighted

Re: Is there an API to set Cloudera Manager monitoring thresholds?

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

Re: Is there an API to set Cloudera Manager monitoring thresholds?

New Contributor

 

 

Exactly I wanted!

 

Thank you @EricL 

Don't have an account?
Coming from Hortonworks? Activate your account here