Skip to content

Instantly share code, notes, and snippets.

@zqfan
Last active August 29, 2015 13:57
Show Gist options
  • Save zqfan/9907518 to your computer and use it in GitHub Desktop.
Save zqfan/9907518 to your computer and use it in GitHub Desktop.

resource-list timestamp cannot use eq

# curl -i -X GET -H 'X-Auth-Token: eaaa9e1b69bf4cb0859651410bc25742' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-ceilometerclient' 'http://160.132.0.17:8777/v2/resources?q.op=eq&q.value=2014-03-12T00%3A00%3A00&q.field=timestamp'
{"error_message": {"debuginfo": null, "faultcode": "Client", "faultstring": "Invalid input for field/attribute op. Value: 'eq'. unimplemented operator for timestamp"}}

meter-list metadata works now

# ceilometer meter-list -q "resource=c576e2a0-be24-43db-bb37-2747481612e0;metadata.size=1"
+-------------+-------+--------+--------------------------------------+----------------------------------+----------------------------------+
| Name        | Type  | Unit   | Resource ID                          | User ID                          | Project ID                       |
+-------------+-------+--------+--------------------------------------+----------------------------------+----------------------------------+
| volume      | gauge | volume | c576e2a0-be24-43db-bb37-2747481612e0 | 823b5f325eab4cf1912733831fba2556 | f61bfd04533a4a208349dc3351aec4ec |
| volume.size | gauge | GB     | c576e2a0-be24-43db-bb37-2747481612e0 | 823b5f325eab4cf1912733831fba2556 | f61bfd04533a4a208349dc3351aec4ec |
+-------------+-------+--------+--------------------------------------+----------------------------------+----------------------------------+
# ceilometer meter-list -q "resource=c576e2a0-be24-43db-bb37-2747481612e0;metadata.size=2"

timestamp 时间格式问题

在sles上可以用yyyy-mm-dd的格式,但在ubuntu上却报错

# curl -i -X GET -H 'X-Auth-Token: 5a18adca04b04a7a8caa2431c1907155' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-ceilometerclient' 'http://160.132.0.17:8777/v2/resources?q.op=ge&q.value=2014-03-12&q.field=timestamp'
{"error_message": {"debuginfo": null, "faultcode": "Server", "faultstring": "int() argument must be a string or a number, not 'NoneType'"}}

ubuntu上发现alarm-update可以修改name,且name可以与已存在的同名

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment