The 'greater than' operator returns values that are equal to the specified value. For example, consider the following query that attempts to retrieve samples having a timestamp larger than a given value.
h@ubuntu:~/junk$ curl -X GET -H X-Auth-Token:8415862d5e2f423c8646d28bd9171b1f -H Content-Type:application/json http://10.0.0.1:8777/v2/meters/cpu_util -d '{"q": [{"field": "resource_id", "value": "cd0dae96-c888-4e0d-a8fd-f555998ca5e8", "op": "eq"}, {"field": "timestamp", "value": "2013-06-23 21:44:15", "op": "gt"}]}' 2>/dev/null |python -mjson.tool
[
{
"counter_name": "cpu_util",
"counter_type": "gauge",
"counter_unit": "%",
"counter_volume": 0.28268073188435955,
"message_id": "0d07ef88-dc4e-11e2-bac4-deadabcfcdd1",
"project_id": "d7030309ef3c47a6ac95a01be6ddbd12",
"resource_id": "cd0dae96-c888-4e0d-a8fd-f555998ca5e8",
"resource_metadata": {
"architecture": "",
"availability_zone": "",
"disk_gb": "",
"display_name": "one",
"ephemeral_gb": "",
"host": "41378f4bbbb00b48d03cd6b79d98bd0a900f8486201243a78c67e9b0",
"image_ref": "05f878a5-cca3-48cf-94ba-6928e9c02441",
"image_ref_url": "http://10.0.0.1:8774/d7030309ef3c47a6ac95a01be6ddbd12/images/05f878a5-cca3-48cf-94ba-6928e9c02441",
"instance_type": "10",
"kernel_id": "",
"memory_mb": "",
"name": "instance-00000018",
"os_type": "",
"ramdisk_id": "",
"reservation_id": "",
"root_gb": "",
"vcpus": ""
},
"source": "openstack",
"timestamp": "2013-06-23T21:44:15",
"user_id": "f45dceb47a35417f813ad7cea8fc60ce"
}
]
Fix proposed to branch: master /review. openstack. org/35585
Review: https:/