API

Welcome to the Nutanix NEXT community. To get started please read our short welcome post. Thanks!

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Cluster Health status via API

SOLVED Go to solution
Highlighted
Wayfarer

How to get Cluster Health status via API

Hello.

Does anybody know how to get Cluster Health status via API?

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Nutanix Employee

Re: How to get Cluster Health status via API

Here is an undocumented v1 API call that will give you what you are looking for:

 

https://clusterIPorDNS:9440/PrismGateway/services/rest/v1/ncc/run_summary

 

 

Keep in mind undocumented API calls are unsupported and can change.

Tags (2)
3 REPLIES
Nutanix Employee

Re: How to get Cluster Health status via API

To monitor the health check for a Nutanix Cluster, you can query the alerts & events generated by the following v2 endpoints:

 

/clusters/alerts

 

/clusters/events

 

Each alert is tied to a healthcheck, and is generated by predefined threshold and poll interval that can be defined in Prism.

You can also enable/disable an alert from the alerts policy in Prism. 

 

To understand which alert is tied to which healthcheck, you can use the "alert_type_uuid" in /cluster/alerts and match against "alert_id_type" in 

/health_checks/

 

Hope this helps!

 
Tags (2)
Wayfarer

Re: How to get Cluster Health status via API

No. As i see, not every health_check generates an alert. So, alerts and events API parts are not what i want.

Health_check API part consists only settings of checks, but not the results. I would like to see the resulting Health status like i see on the home page in Prism.

Tags (2)
Nutanix Employee

Re: How to get Cluster Health status via API

Here is an undocumented v1 API call that will give you what you are looking for:

 

https://clusterIPorDNS:9440/PrismGateway/services/rest/v1/ncc/run_summary

 

 

Keep in mind undocumented API calls are unsupported and can change.

Tags (2)