6.3.2
Resource Manager Queries
During each iteration of Moab Workload Manager's cycle, it will query MWS through the RM interface to access current node, virtual machine, and job information. At this point, all reports are loaded from the database and consolidated into a single report of each object as explained in 6.1.6 Data Consolidation.

All unset (or null) values for properties on reports are ignored.
In some cases it may be desired to query MWS directly for the current consolidated node and job reports. This can be done using the following URLs, which return data in a format that is a subset of the API version 3 interface for each object (i.e., /rest/nodes?api-version=3, /rest/jobs?api-version=3).
Query | Description |
---|---|
/rest/plugins/all/rm/cluster-query?api-version=3 | Retrieves consolidated node reports from all plugins. |
/rest/plugins/<ID>/rm/cluster-query?api-version=3 | Retrieves consolidated node reports for the specified plugin ID. |
/rest/plugins/all/rm/workload-query?api-version=3 | Retrieves consolidated job reports from all plugins. |
/rest/plugins/<ID>/rm/workload-query?api-version=3 | Retrieves consolidated job reports for the specified plugin ID. |
These queries have no effect on the data itself. In other words, reports are not removed or manipulated when RM queries are performed. These are manipulated only by the RM services as described in 6.2.9 Reporting State Data.
Examples
The following example uses cURL (see 8.1.2 curl Samples) to perform the query:
$ curl -u moab-admin:changeme! https://localhost:8080/mws/rest/plugins/all/rm/cluster-query?api-version=3&pretty=true
{
"nodes": {
"n1.test": {
"states": {
"state": "IDLE"
},
"lastUpdatedDate": 1382386344,
"resources": {
"processors": {
"configured": 4
},
"memory": {
"configured": 8191,
"available": 7206
},
"gres1": {
"configured": 100
}
},
"metrics": {
"cpuLoad": 0.008233333333333334,
"vmcount": 0,
"cpuUtilization": 0.2008333333333333
},
"featuresReported": [
"feature1"
],
"ipAddress": "10.0.8.69",
"operatingSystem": "linux",
"variables": {
"VCENTER_DATASTORE_REMOTE1": "datastore-448",
"VCENTER_DATASTORE_LOCAL1": "datastore-411"
},
"attributes": {
"MOAB_DATACENTER": {
"value": "vcenter-datacenter-401",
"displayValue": "vcenter-vcenter - adaptive data center"
}
}
},
"n2.test": {
"states": {
"state": "IDLE"
},
"lastUpdatedDate": 1382386344,
"resources": {
"processors": {
"configured": 4
},
"memory": {
"configured": 10239,
"available": 9227
},
"gres1": {
"configured": 100
}
},
"metrics": {
"cpuLoad": 0.00805,
"vmcount": 0,
"cpuUtilization": 0.19666666666666666
},
"featuresReported": [
"feature1",
"feature2"
],
"ipAddress": "10.0.8.76",
"operatingSystem": "linux",
"variables": {
"VCENTER_DATASTORE_REMOTE1": "datastore-448",
"VCENTER_DATASTORE_LOCAL1": "datastore-415"
},
"attributes": {
"MOAB_DATACENTER": {
"value": "vcenter-datacenter-401",
"displayValue": "vcenter-vcenter - adaptive data center"
}
}
},
"n3.test": {
"states": {
"state": "IDLE"
},
"lastUpdatedDate": 1382386344,
"resources": {
"processors": {
"configured": 4
},
"memory": {
"configured": 10239,
"available": 9229
},
"gres1": {
"configured": 100
}
},
"metrics": {
"cpuLoad": 0.0097,
"vmcount": 0,
"cpuUtilization": 0.2375
},
"featuresReported": [
"feature1"
],
"ipAddress": "10.0.8.72",
"operatingSystem": "linux",
"variables": {
"VCENTER_DATASTORE_REMOTE1": "datastore-448",
"VCENTER_DATASTORE_LOCAL1": "datastore-416"
},
"attributes": {
"MOAB_DATACENTER": {
"value": "vcenter-datacenter-401",
"displayValue": "vcenter-vcenter - adaptive data center"
}
}
},
"n4.test": {
"states": {
"state": "IDLE"
},
"lastUpdatedDate": 1382386344,
"resources": {
"processors": {
"configured": 4
},
"memory": {
"configured": 10239,
"available": 9229
},
"gres1": {
"configured": 100
}
},
"metrics": {
"cpuLoad": 0.007883333333333334,
"vmcount": 0,
"cpuUtilization": 0.1925
},
"featuresReported": [
"feature2"
],
"ipAddress": "10.0.8.77",
"operatingSystem": "linux",
"variables": {
"VCENTER_DATASTORE_REMOTE1": "datastore-448",
"VCENTER_DATASTORE_LOCAL1": "datastore-958"
},
"attributes": {
"MOAB_DATACENTER": {
"value": "vcenter-datacenter-401",
"displayValue": "vcenter-vcenter - adaptive data center"
}
}
}
}
}