<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 22, 2014 at 1:51 PM, Tim Bell <span dir="ltr"><<a href="mailto:Tim.Bell@cern.ch" target="_blank">Tim.Bell@cern.ch</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Does that mean the best patch would be directly into the ceilometer CLI help to explain more what key[op]value means ?<br>
<br></blockquote><div><br></div><div>Yes, directly in the output from the CLI would be best.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Fixing it there would give the benefit of better CLI help but would that automagically produce better docs or should I do some copy/paste into the user guide ?<br><br></blockquote><div><br></div><div>I'd prefer our autodoc procedure for now. Ideally the User Guide would do a more complete "scenario" for celiometer than a single command.</div>

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