5.228 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/licenses Get License Information -- -- --

This topic contains these sections:

5.228.1 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"
}

5.228.2 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.

{}

5.228.3 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

5.228.3.A 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,
    "zmqInsightConnected": true
  },
  "ldap": {"connected": true},
  "pam": {"connected": false},
  "zmq": {"connected": true},
  "insight": {"connected": true},
  "plugins": {"connected": true}
}

5.228.3.B 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": "mam",
    "host": "localhost",
    "port": 7112,
    "version": "9.1.0",
    "message": null
  },
  "mongo":   {
    "connected": true,
    "host": "127.0.0.1",
    "port": 27017,
    "replicaSet": null,
    "databaseName": "mws",
    "username": null,
    "version": "3.2.x",
    "message": null
  },
  "mwm":   {
    "connected": true,
    "adminUser": "root",
    "host": "10.2.185.228",
    "port": 42559,
    "version": "9.1.0",
    "licensedFeatures":     [
      "grid",
      "green",
      "elasticcomputing",
      "groupsharing",
      "advancedrm",
      "workflow",
      "accounting"
    ],
    "state": "RUNNING",
    "mongo":     {
      "connected": "UP",
      "credentialsSet": true,
      "host": "localhost",
      "port": 27017
    },
    "zmq":     {
      "connected": true,
      "encryptionStatus": "ON",
      "port": 5570>
    },
    "zmqInsight":     {
      "connected": true,
      "encryptionStatus": "ON",
      "host": "*",
      "port": 5574,
      "reliabilityPort": 5575,
      "endpoint": "localhost:5568",
      "storeDir": "/opt/moab/spool/insight_store/",
      "storeSize": 1024
    },
    "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": false,
    "authenticationModule": null,
    "message": "PAM is not configured. Please check the MWS configuration."
  },
  "zmq":   {
    "connected": true,
    "version": "4.1.4",
    "message": null,
    "mwmSubscriber":     {
      "connected": true,
      "address": "10.2.185.228",
      "port": 5570,
      "message": null
    },
    "mwsSubscriber":     {
      "connected": true,
      "address": "localhost",
      "port": 5564,
      "message": null
    },
    "publisher":     {
      "connected": true,
      "address": "*",
      "port": 5564,
      "message": null
    }
  },
  "insight":   {
    "connected": true,
    "version": "9.1.0",
    "changeset": "d115caa4f85b150f5a2a819c66a8e49ade0841c0",
    "host": "10.2.185.228",
    "port": 5568,
    "message": null,
    "moabMongoConnection":     {
      "connected": true,
      "databaseName": "moab",
      "host": "127.0.0.1",
      "message": null,
      "port": 27017,
      "username": "insight_user"
    },
    "insightMongoConnection":     {
      "connected": true,
      "databaseName": "insight",
      "host": "127.0.0.1",
      "message": null,
      "port": 27017,
      "username": "insight_user"
    },
    "insightKafkaConnection":     {
      "batchSize": 200,
      "bootstrapServers": "localhost:9092",
      "bufferMemory": "33554432",
      "connected": true,
      "enabled": false,
      "lingerMilliseconds": 1,
      "maximumBlockMilliseconds": 60000,
      "message": null,
      "topic": "insight"
    }
  },
  "plugins":   {
    "connected": true,
    "message": null
  }
}

5.228.4 Get License Information

The HTTP GET method is used to retrieve license information from Moab Workload Manager.

Quick reference

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

URLs and parameters

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

Sample response

The response contains the name of the licensed host, the path to the license file on that host, the license expiration date, the number of processors, sockets, and virtual machines licensed, and the list of features in the license. If Moab reports any license errors, they will appear in the errors array.

{
  "expirationDate": "2017-01-15 18:21:00 UTC",
  "host": "localhost",
  "path": "/opt/moab/etc/moab.lic",
  "processors": 2000000,
  "sockets": 0,
  "virtualMachines": 0,
  "features":   [
        {
      "name": "grid",
      "description": "Unify management of multiple clusters",
      "expirationDate": "2017-01-15 18:21:00 UTC",
      "enabled": true
    },
        {
      "name": "green",
      "description": "Workload-aware power optimization management",
      "expirationDate": "2017-01-15 18:21:00 UTC",
      "enabled": true
    },
        {
      "name": "provision",
      "description": "Provisioning of Operating Systems",
      "expirationDate": null,
      "enabled": false
    },
        {
      "name": "elasticcomputing",
      "description": "Elastically add to or remove resources from a cluster / dynamically provision the OS",
      "expirationDate": "2017-01-15 18:21:00 UTC",
      "enabled": true
    },
        {
      "name": "groupsharing",
      "description": "Policy management for groups to use and share the cluster",
      "expirationDate": "2017-01-15 18:21:00 UTC",
      "enabled": true
    },
        {
      "name": "advancedrm",
      "description": "Policies and capabilities that control resources",
      "expirationDate": "2017-01-15 18:21:00 UTC",
      "enabled": true
    },
        {
      "name": "workflow",
      "description": "Automate both end-to-end workload and system processes",
      "expirationDate": "2017-01-15 18:21:00 UTC",
      "enabled": true
    },
        {
      "name": "accounting",
      "description": "Accounting management for usage tracking and charging",
      "expirationDate": "2017-01-15 18:21:00 UTC",
      "enabled": true
    },
        {
      "name": "passthrough",
      "description": "Pass-through RM monitoring mode limitation.",
      "expirationDate": null,
      "enabled": false
    }
  ],
  "errors": ["WARNING - OS provisioning requires 'provision' in license"],
  "elasticUsage":   {
    "dailyProcessorSeconds": 46740,
    "monthlyProcessorSeconds": 837808,
    "quarterlyProcessorSeconds": 837808,
    "yearlyProcessorSeconds": 837808,
    "maximumDailyProcessorSeconds": 0,
    "maximumMonthlyProcessorSeconds": 0,
    "maximumQuarterlyProcessorSeconds": 0,
    "maximumYearlyProcessorSeconds": 0,
    "elasticUsageByQOS":     [
            {
        "name": "HIGH",
        "dailyProcessorSeconds": 0,
        "monthlyProcessorSeconds": 0,
        "quarterlyProcessorSeconds": 0,
        "yearlyProcessorSeconds": 0,
        "maximumDailyProcessorSeconds": 3600,
        "maximumMonthlyProcessorSeconds": 0,
        "maximumQuarterlyProcessorSeconds": 0,
        "maximumYearlyProcessorSeconds": 0
      },
            {
        "name": "MEDIUM",
        "dailyProcessorSeconds": 0,
        "monthlyProcessorSeconds": 0,
        "quarterlyProcessorSeconds": 0,
        "yearlyProcessorSeconds": 0,
        "maximumDailyProcessorSeconds": 0,
        "maximumMonthlyProcessorSeconds": 0,
        "maximumQuarterlyProcessorSeconds": 0,
        "maximumYearlyProcessorSeconds": 0
      },
            {
        "name": "LOW",
        "dailyProcessorSeconds": 11683.43,
        "monthlyProcessorSeconds": 742860,
        "quarterlyProcessorSeconds": 742860,
        "yearlyProcessorSeconds": 742860,
        "maximumDailyProcessorSeconds": 0,
        "maximumMonthlyProcessorSeconds": 0,
        "maximumQuarterlyProcessorSeconds": 0,
        "maximumYearlyProcessorSeconds": 0
      }
    ]
  }
}

Related Topics 

© 2016 Adaptive Computing