Comment 3 for bug 1377157

Revision history for this message
Jim Mankovich (jman-a) wrote : Re: [Bug 1377157] Re: ipmi sensor naming in ceilometer is not consumer friendly

Chris,

With the the current implementation, the node_uuid is not available the
metadata, it
is only available in the resource ID. If the node_uuid were replicated
in the metadata
for every sensor, then the query you mentioned would work. I would
still rather see
the resource ID as just the node_uuid so you could find a platform
directly using resource
list and get links to all the sensors in the platform. With the
current naming of resource
ID, each sensor is its own resource so to find all the sensors for a
platform will require
some kind of searching through all resource IDs to find
metadata.node_uuid matches.

On 10/6/2014 5:42 AM, Chris Dent wrote:
> I think the general idea with meters in ceilometer is that the meter
> name is generic across a type of thing and that things like resource id
> and metadata are used to narrow the output.
>
> I agree that this can result in some unfriendliness on the consumption
> side. What you really want to be able to say is "give me some
> temperature information on the node x" not have to construct some
> magical query involving an inscrutable query syntax.
>
> As is so often the case with APIs that are supposed to make everything
> possible, nobody is made happy. Presumably a workaround are intermediary
> commands which call the API for specific needs.
>
> Looking at the code[1] the ID of the node should show up as a key value
> pair in the resource_metadata so a query could be constructed as:
>
> ceilometer sample-list -m hardware.ipmi.fan -q
> 'metadata.node_uuid=something'
>
> Note: I haven't actually tested this as I don't currently have an active
> Ironic setup, but that covers the concept. Does it work for you Jim?
>
> [1]
> https://github.com/openstack/ceilometer/blob/master/ceilometer/ipmi/notifications/ironic.py#L98
>

--
--- Jim Mankovich | <email address hidden> (US Mountain Time) ---