Checking System State

As described in the section Default Ports, Fusion runs several components as separate JVMs running on different ports. Each of the components is capable of reporting it’s status. The proxy component reports status for all of the other components.

Full System Check

To see if each component has been started, a simple API call to the proxy (running on port 8764 by default) will return the status of each component of the system.

 curl http://localhost:8764/api

The response should look similar to the following. If 'ping' is true for each service, all of the system components are running.

{
    "version": "0.9.0-SNAPSHOT-jenkins.build.105+git.sha.b425e2a",
    "enabledRealms": [
        "native"
    ],
    "initMeta": {
        "version": "0.9.0-SNAPSHOT-jenkins.build.105+git.sha.b425e2a",
        "initializedAt": "2014-10-06T17:43:31Z",
        "createdAt": "2014-10-06T17:43:31Z"
    },
    "startTime": "2014-10-06T18:38:08Z",
    "status": {
        "connectors": {
            "ping": true
        },
        "apollo": {
            "ping": true
        },
        "apolloZk": {
            "ping": true
        },
        "db": {
            "ping": true
        }
    }
}

Solr Health Check

The Fusion UI and API services are not accessible if ZooKeeper and Solr are not in healthy state. A Solr health check can be performed with a ping request.

 curl http://localhost:8983/solr/admin/ping

The response will be a standard Solr XML response, similar to the following.

<?xml version="1.0" encoding="UTF-8"?>
<response>
   <lst name="responseHeader">
      <int name="status">0</int>
      <int name="QTime">6</int>
      <lst name="params">
         <str name="df">text</str>
         <str name="echoParams">all</str>
         <str name="rows">10</str>
         <str name="echoParams">all</str>
         <str name="q">solrpingquery</str>
         <str name="distrib">false</str>
      </lst>
   </lst>
   <str name="status">OK</str>
</response>

The 'status' should be "OK" if Solr is running properly.

REST API Services Health Check

All of the Fusion API backend services (except Connectors and the UI) are started at port 8765 when the run.sh script is executed. The Fusion UI depends on all these services.

If all the services are started without any issues, then the below ping request should return response 'ok'.

 curl http://localhost:8765/api/v1

As an additional check, you can also query the system/status endpoint, which should return a response 'started'.

curl http://localhost:8765/api/v1/system/status

The response would look like:

{
  "status" : "started"
}

Connectors Health Check

The Connectors health check can be performed by a ping request to port 8984. Similar to the previous ping request, the returned response is 'ok' if the service starts successfully.

 curl http://localhost:8984/connectors/v1

As an additional check, you can also query the system/status endpoint, which should return a response 'started'.

curl http://localhost:8984/connectors/v1/system/status

The response would look like:

{
  "status" : "started"
}