Moab Web Services > Resources > Diagnostics

Diagnostics

This section describes additional REST calls that are available for performing diagnostics on Moab Web Services.

Supported methods

Resource GET PUT POST DELETE
/rest/diag/about Get Version Information -- -- --
/rest/diag/auth Diagnose Authentication -- -- --
/rest/diag/health/summary Get Health Summary -- -- --
/rest/diag/health/detail Get Health Detail -- -- --

/rest/diag/ldap is deprecated. All information that was available in that resource is now available in /rest/diag/health/detail.

This topic contains these sections:

Get Version Information

The HTTP GET method is used to retrieve version and build information.

Quick reference

GET http://localhost:8080/mws/rest/diag/about?api-version=3

URLs and parameters

GET http://localhost:8080/mws/rest/diag/about?api-version=3

Sample response

The response contains the application suite, version, build date, and revision.

{
  "suite": "CLOUD",
  "version": "7.2.2",
  "buildDate": "2013.03.15_13.12.45",
  "revision": "302238e24e327f4aa45ab4c91834216a7fc19d63"
}

Diagnose Authentication

The HTTP GET method is used to test for proper authentication. This resource is designed to be used as a simple validation of credentials and gives no output besides the response code.

Quick reference

GET http://localhost:8080/mws/rest/diag/auth?api-version=3

URLs and parameters

GET http://localhost:8080/mws/rest/diag/auth?api-version=3

Sample response

A successful result is indicated by the 200 response code while a failure is indicated by a 401 response code.

{}

Connection Health Information

The HTTP GET method is used to retrieve health or status information for connections to external systems or software. There are two available resources for health, one that returns simple summary information and another that returns detailed information.

Quick reference

GET http://localhost:8080/mws/rest/diag/health/summary?api-version=3
GET http://localhost:8080/mws/rest/diag/health/detail?api-version=3

Get Health Summary

URLs and parameters

GET http://localhost:8080/mws/rest/diag/health/summary?api-version=3

If the MongoDB connection is down, authenticated resources are not available. While this resource does not possess much detail beyond that of simple connection information, it is still useful as it does not require authentication and therefore can be used to determine connection problems with MongoDB.

Sample response

The response contains the connection health for Moab Workload Manager (MWM), Moab Accounting Manager (MAM), MongoDB, LDAP, ZeroMQ, PAM, and the Insight database. A true response value indicates that the connection is healthy and available, and a false response indicates that the connection is currently down. Likewise, the mongoConnected property for Moab signifies the state of the Moab to MongoDB connection. The possible values of this state are UP, DOWN, NOT_CONFIGURED (when the MongoDB server is not configured in Moab), NOT_SUPPORTED (when Moab is not compiled with MongoDB support), and UNKNOWN (when MWS cannot communicate with Moab).

{
  "mam": {"connected": true},
  "mongo": {"connected": true},
  "mwm":   {
    "connected": true,
    "mongoConnected": "UP",
    "zmqConnected": true
  },
  "ldap": {"connected": true},
  "pam": {"connected": true},
  "zmq": {"connected": true}, 
  "insight": {"connected": true}
}

Get Health Detail

URLs and parameters

GET http://localhost:8080/mws/rest/diag/health/detail?api-version=3

If the MongoDB connection is down, authenticated resources such as this are not available. In this case, using the Get Health Summary instead may be required.

Sample response

The response contains the connection health and information for Moab Workload Manager (MWM), Moab Accounting Manager (MAM), MongoDB, LDAP, ZeroMQ, PAM, and the Insight database. A "connected": true response value indicates that the connection is healthy and available, and a false response indicates that the connection is currently down. Likewise, the mongoConnected property for Moab signifies the state of the Moab to MongoDB connection. The possible values of this state are UP, DOWN, NOT_CONFIGURED (when the MongoDB server is not configured in Moab), NOT_SUPPORTED (when Moab is not compiled with MongoDB support), and UNKNOWN (when MWS cannot communicate with Moab). A message is also present for all down connections except Moab to MongoDB giving a reason for the error state.

{
  "mam":   {
    "connected": true,
    "adminUser": "root",
    "host": "mamhost",
    "port": 7741,
    "version": "7.5",
    "message": null
  },
  "mongo":   {
    "connected": true,
    "host": "127.0.0.1",
    "port": 27017,
    "replicaSet": null,
    "databaseName": "mws",
    "username": {},
    "version": "2.4.8",
    "message": null
  },
  "mwm":   {
    "connected": true,
    "adminUser": "root",
    "host": "localhost",
    "port": 42559,
    "version": "7.5",
    "licensedFeatures":     [
      "green",
      "provision",
      "vm"
    ],
    "state": "RUNNING",
    "mongo":     {
      "connected": "UP",
      "credentialsSet": false,
      "host": "myhost",
      "port": 27017
    },
    "zmq":     {
      "connected": true,
      "encryptionStatus": "OFF",
      "port": 5563
    },
    "message": null
  },
  "ldap":   {
    "connected": true,
    "message": null,
    "server": "openldapnis.ac",
    "port": 389,
    "baseDNs": ["dc=testldap,dc=ac"],
    "bindUser": "cn=admin,dc=testldap,dc=ac",
    "directoryType": "OpenLDAP Using InetOrgPerson Schema",
    "securityType": "NONE",
    "userObjectClass": "inetOrgPerson",
    "groupObjectClass": "groupOfNames",
    "ouObjectClass": "organizationalUnit",
    "userMembershipAttribute": null,
    "groupMembershipAttribute": "member",
    "userNameAttribute": "uid"
  },
  "pam":   {
    "connected": true,
    "authenticationModule": "system-auth",
    "message": "PAM is configured in MWS."
  },
  "zmq":   {
    "connected": true,
    "version": "3.2.3",
    "message": null,
    "mwmSubscriber":     {
      "connected": true,
      "address": "localhost",
      "port": 5563,
      "message": null
    },
    "mwsSubscriber":     {
      "connected": true,
      "address": "localhost",
      "port": 5564,
      "message": null
    },
    "publisher":     {
      "connected": true,
      "address": "*",
      "port": 5564,
      "message": null
    }
  },
  "insight":     {
    "connected": true,
    "jdbcUrl": "jdbc:postgresql://localhost/moab",
    "username": "moab-admin",
    "databaseType": "PostgreSQL",
    "version": "9.3.3",
    "message": null
  }
}

Related Topics 

© 2015 Adaptive Computing