clusterGetServerStatus

Use this method to get the list of servers in the cluster and the status of each one. On a Zend Server Cluster Manager with no valid license, this operation fails. This operation causes Zend Server Cluster Manager to check the status of servers and return fresh, non-cached information. This is different from the Servers List tab in the GUI, which may present cached information. Users interested in reducing load by caching this information should do it in their own code.

 

 

Required Permissions: read

HTTP method: GET

Supported by Editions: Zend Server Cluster Manager

Request Parameters:

Parameter

 Type

Required

Description

servers

Array

No

A list of server IDs. If specified, the status is returned for these servers only. If not specified, the status of all the servers is returned.

 

Expected Response Code: 200 OK

Response Type: serversList

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

404

 noSuchServer

One or more of the provided server IDs does not exist in the cluster.

405

notImplementedByEdition

This method is only available on Zend Server Cluster Manager.

500

serverNotLicensed

Zend Server Cluster Manager is not licensed.

 

Usage Example

Example:

Request (URI broken for readability):

GET /ZendServerManager/Api/clusterGetServerStatus?  
  servers%5B0%5D=12&servers%5B1%5D=15

Response:

<?xml version="1.0" encoding="UTF-8"?>
<zendServerAPIResponse xmlns="http://www.zend.com/server/api/1.0">
    
  <requestData>
    <apiKeyName>angel.eyes</apiKeyName>
    <method>clusterGetServersStatus</method>
  </requestData>
  
  <responseData>
    <serversList>
      <serverInfo>
        <id>12</id>
        <name>www-01</name>
        <address>https://www-01.local:10082/ZendServer</address>
        <status>OK</status>
        <messageList />
      </serverInfo>
      <serverInfo>
        <id>15</id>
        <name>www-02</name>
        <address>https://www-02.local:10082/ZendServer</address>
        <status>pendingRestart</status>
        <messageList>
          <warning>This server is waiting a PHP restart</warning>
        </messageList>
      </serverInfo>
    </serversList>
  </responseData>
</zendServerAPIResponse>

 

Important Note:

For Zend Server or Zend Server Cluster Manager on Mac or Linux, this action is also available via the command line using CLI Tools. For more information see CLI Tools.

 

 

 

Related Links

Related Links:

Server and Cluster Management Methods