Changes between Version 8 and Version 9 of OperationalMonitoring/DatastorePolling
- Timestamp:
- 02/17/14 17:26:50 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OperationalMonitoring/DatastorePolling
v8 v9 27 27 If the aggregator is tracking sliver and slice info, the aggregator may also be directed to a slice authority local datastore, which is a different datastore than one containing shared host nodes. Here is a [wiki:OperationalMonitoring/DataSchema#Dataaboutasliceauthority detailed example slice query], and here is a [wiki:OperationalMonitoring/DataSchema#DataaboutaGENIuser detailed example of a user query]. Both of these queries are of similar form with <datastore_url>/info/slice/<slice_id> and <datastore_url>/info/user/<user_id> respectively. 28 28 29 As of 17-Feb, we currently do not support querying multiple objects in a single info query. For example, <datastore_url>/info/node/ will not return all the node info at thelocal datastore.29 As of 17-Feb, we currently do not support querying multiple objects in a single info query. For example, <datastore_url>/info/node/ will not return all the nodes' info at that local datastore. 30 30 31 31 == Data Queries == 32 32 33 Once an aggregator has information about the objects it wants to query, it can begin querying at <datastore_url>/data/. The data queries require three filters and passed in a python dictionary format: 34 35 * "eventType": is a list of events or measurements to query. In the reference implementation these equate to database tables. This page contains [wiki:OperationalMonitoring/DataForUseCases a list of eventTypes] 36 {{{ 37 "eventType": ["mem_used","cpu_util"] 38 }}} 39 40 * "ts": is a dictionary of timestamp filters. It is recommended to provide a ts dictionary that includes at least a greater than filter (gte or gt) to limit the amount of windowed data. The accepted filters are gt, gte, lt, and lte. 41 {{{ 42 "ts":{"gte":1391192225475202,"lt":1391192225480000} 43 }}} 44 45 * "obj": is a dictionary of objects of a single type. The dictionary contains a type, which can be a node, interface, sliver, etc., and an id list, which lists the id's to return data about. 46 {{{ 47 "obj":{"type":"node","id":["404-ig-pc1","404-ig-pc2"] 48 }}} 49 50 Here is a complete example 51 {{{ 52 <datastore_url>/data/q?={"filters":{"eventType": ["mem_used","cpu_util"],"ts":{"gte":1391192225475202,"lt":1391192225480000},"obj":{"type":"node","id":["404-ig-pc1","404-ig-pc2"]} 53 }}} 33 54 34 55 The REST noun and JSON format include the following: