[Openstack-docs] ceilometer CLI docs
Andreas Jaeger
aj at suse.com
Wed Jan 22 19:46:33 UTC 2014
On 01/22/2014 08:21 PM, Tim Bell wrote:
> I’m trying to find the ceilometer CLI docs which would explain the
> various options for the options on the statistics subcommand. The help
> on the CLI is not very verbose.
>
>
> The key[op]value parameters for the –query do not seem to be documented
> anywhere I could find.
>
>
>
> Reverse engineering shows that you can have –q project=<projecteid> and
> –q resource=<resourceid> along with lots of other start/stop etc.
> parameters.
>
>
>
> Is there a place where this is documented ? If not, which guide should
> have this in ? I also think the code should report better than
> key[op]value, at minimum giving some of the keys and the format of the
> value.
This should be in the User Guide:
http://docs.openstack.org/user-guide/content/
Note that I just update the appendix with autogenerated comments, see
https://review.openstack.org/#/c/68227/
Andreas
>
>
> OK to start raising bugs/patches/reviews but I want to check I’ve not
> missed something.
>
>
>
> Tim
>
> -------
>
>
>
> $ ceilometer help statistics
>
> usage: ceilometer statistics [-q <QUERY>] -m <NAME> [-p <PERIOD>]
>
>
>
> List the statistics for this meter.
>
>
>
> Optional arguments:
>
> -q <QUERY>, --query <QUERY>
>
> key[op]value; list.
>
> -m <NAME>, --meter <NAME>
>
> Name of meter to show samples for. Required.
>
> -p <PERIOD>, --period <PERIOD>
>
> Period in seconds over which to group samples.
>
>
>
> ceilometer --debug statistics -m cpu_util -q marvin=android
>
> INFO (connectionpool:535) Starting new HTTPS connection (1):
> openstack.cern.ch
>
> DEBUG (connectionpool:295) "POST /v2.0/tokens HTTP/1.1" 200 2546
>
> DEBUG (iso8601:166) Parsed 2014-01-23T19:19:18Z into {'tz_sign': None,
> 'second_fraction': None, 'hour': u'19', 'tz_hour': None, 'month': u'01',
> 'timezone': u'Z', 'second': u'18', 'tz_minute': None, 'year': u'2014',
> 'separator': u'T', 'day': u'23', 'minute': u'19'} with default timezone
> <iso8601.iso8601.Utc object at 0x1a3b750>
>
> DEBUG (iso8601:124) Got u'2014' for 'year' with default None
>
> DEBUG (iso8601:124) Got u'01' for 'month' with default None
>
> DEBUG (iso8601:124) Got u'23' for 'day' with default None
>
> DEBUG (iso8601:124) Got u'19' for 'hour' with default None
>
> DEBUG (iso8601:124) Got u'19' for 'minute' with default None
>
> DEBUG (iso8601:124) Got u'18' for 'second' with default None
>
> DEBUG (http:111) curl -i -X GET -H 'X-Auth-Token:
> 990c37d74d2244f79b95104682766bdf' -H 'Content-Type: application/json' -H
> 'Accept: application/json' -H 'User-Agent: python-ceilometerclient'
> http://openstack.cern.ch:8777/v2/meters/cpu_util/statistics?q.field=marvin&q.op=eq&q.value=android
>
> DEBUG (http:121)
>
> HTTP/1.0 400 Bad Request
>
> date: Wed, 22 Jan 2014 19:19:18 GMT
>
> content-length: 318
>
> content-type: application/json
>
> connection: keep-alive
>
> server: WSGIServer/0.1 Python/2.6.6
>
>
>
> {"error_message": {"debuginfo": null, "faultcode": "Client",
> "faultstring": "Unknown argument: \"marvin\": unrecognized field in
> query: [<Query u'marvin' eq u'android' Unset>], valid keys: set(['end',
> 'start', 'metaquery', 'meter', 'project', 'source', 'user',
> 'start_timestamp_op', 'resource', 'end_timestamp_op'])"}}
>
>
>
> WARNING (http:172) Request returned failure status.
>
> HTTPBadRequest (HTTP 400)
>
>
>
> From this, the eventual syntax needed seems to be
>
>
>
> ceilometer statistics -m cpu_util -q
> resource=0e171bd4-d006-4411-b152-a45161190e47
>
>
>
> Tim
>
> --
>
>
>
> _______________________________________________
> Openstack-docs mailing list
> Openstack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
More information about the Openstack-docs
mailing list