[openstack-dev] [telemetry][aodh] "aodh alarm list" vs "aodh alarm search"

Julien Danjou julien at danjou.info
Mon Mar 7 08:15:04 UTC 2016


On Fri, Mar 04 2016, liusheng wrote:

> Hi folks,
> Currently, we have supported "aodh alarm list" and "aodh alarm search" commands
> to query alarms.  They both need mandatory "--type" parameter, and I want to
> drop the limitation[1]. if we agree that, the "alarm list"  will only used to
> list all alarms and don't support any query pamareters, it will be equal to
> "alarm search" command without any --query parameter specified.  The "alarm
> search" command is designed to support complex query which can perform almost
> all the filtering query, the complex query has been supportted in Gnocchi.  IRC
> meeting disscussions [3].
>
> So we don't need two overlapping interfaces and want to drop one, "alarm list"
> or "alarm search" ?
>
> i. The "alarm search" need users to post a expression in JSON format to perform
> spedific query, it is not easy to use and it is unlike a customary practice (I
> mean the most common usages of filtering query of other openstack projects),
> compare to "alarm list --filter xxx=zzz" usage.
>
> ii. we don't have a strong requirement to support *complex* query scenarios of
> alarms, we only have alarms and alarm history records in aodh.
>
> iii. I personally think it is enough to support filtering query with "--filter"
> which is easy to implement [2], and, we have plan to support pagination query
> in aodh.
>
> any thoughts ?

I agree that filtering is probably enough in Aodh use case.

OTOH, we have support for complex query already merged in, and we can
share the code with Gnocchi (and probably Ceilometer).

`alarm list' is actually `GET /v2/alarms', which is very REST-y, so I
don't think we should drop it.

Complex search is there, the code should be shared¹ and has a tiny cost
on our code base. So is there really a point in dropping it?

Gnocchi has exactly the same problem, and I think in the end having both
is just good enough.


¹  Doing a oslo.db.complexsearch lib is on my TODO for a while :)

-- 
Julien Danjou
// Free Software hacker
// https://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160307/8bf128d7/attachment.pgp>


More information about the OpenStack-dev mailing list