ViPR 2.1 - Monitor Commodity Health with the REST API

Table of Contents

Commodity health REST APIs

Describes the REST APIs for returning Commodity health information.

Test the REST API in your browser

The easiest way to test the REST API is to point your browser towards the IP of your ViPR Controller. You will need to log in when you make the first call.

Here, a controller IP is provided along with the GET /vdc/fabric/health endpoint:

https://<controller_ip>:4443<rest_api_endpoint>/?using-cookies

https://<controller_ip>:4443/vdc/fabric/health/?using-cookies

Fabric-level health REST API

Endpoint: GET /external/health

The fabric-level health REST API takes no parameters and returns an overall status of the Commodity storage system or ECS Appliance. The XML report also returns the IDs of any node that has a BAD or SUSPECT status or is in maintenance mode. You can then use the node-level health REST API to get details on the health of individual nodes.

The return body looks like this:

GET /external/health
<fabric_health>
    <status>[GOOD|BAD|SUSPECT]</status>
    <sw_version>fabric-1.0.0.0</sw_version>
    <node_count>X</node_count>
    <bad_nodes>
        <id>urn:fabric:node:1234-5678:</id>
        <id>urn:fabric:node:1111-2222:</id>
    </bad_nodes>
    <suspect_nodes>
        <id>urn:fabric:node:4455-6677:</id>
        <id>urn:fabric:node:8888-0000:</id>
    <suspect_nodes>
    <maintenance_mode_nodes>
        <id>urn:fabric:node:5678-0987:</id>
    </maintenance_mode_nodes>
<fabric_health>

Test the call in your browser:

https://<controller_ip>:4443/vdc/fabric/health/?using-cookies

Node-level health REST API

Endpoint: GET /external/nodes/{node_id}/health

The node health REST API returns a report on:

The return body looks like this:

<node_health>
    <id>...</id>
    <link rel="self" href="..."/>
    <status>[GOOD|BAD|SUSPECT]<status>
    <mode>[OPERATIONAL|MAINTENANCE]</mode>
    <service>
        <name>object</name>
        <status>[INSTALLED|RUNNING|STOPPED|CRASHED]</status>
    </service>
    <service>
        <name>zookeeper</name>
        <status>[INSTALLED|RUNNING|STOPPED|CRASHED]</status>
    </service>
    <service>
        <name>block</name>
        <status>[INSTALLED|RUNNING|STOPPED|CRASHED]</status>
    </service>
    <disk_count>X</disk_count>
    <bad_disks>
        <id>urn:fabric:disk:1234-5678:</id>
        <id>urn:fabric:disk:9078-6754:</id>
    </bad_disks>
    <suspect_disks>
        <id>urn:fabric:disk:1111-3333:</id>
    </suspect_disks>    
    <staging_disks>
        <id>urn:fabric:disk:7777-8888:</id>
        <id>urn:fabric:disk:5544-3322:</id>
    </staging_disks>
    <maintenance_mode_disks>
        <id>urn:fabric:disk:8888-7777:</id>
    </maintenance_mode_disks>
</node_health>

To get a list of node IDs in your system call the fabric-level node list REST API.

https://<controller_ip>:4443/vdc/fabric/nodes/?using-cookies

Call the node health REST API on one of the returned node IDs

https://<controller_ip>:4443/vdc/fabric/nodes/<node_id>/health/?using-cookies

Back to Top