Re: [openstack-dev] [Ceilometer][Gnocchi]Gnocchi cannot deal with combined resource-id ?

2015-09-13 Thread Luo Gangyi
>  I was talking about that:

>   
> https://git.openstack.org/cgit/openstack/ceilometer/tree/etc/ceilometer/gnocchi_resources.yaml#n67

 I check it again, it seems gnocchin_resouces.yaml was updated on Sep 1, 2015, 
and my Ceilometer code is not
 updated. 
 Thanks Julien.
  --
 Luo Gangyi   luogan...@cmss.chinamobile.com



  
  

 

 -- Original --
  From:  "Julien Danjou";;
 Date:  Sat, Sep 12, 2015 10:54 PM
 To:  "Luo Gangyi"; 
 Cc:  "OpenStack Development Mailing L"; 
 Subject:  Re: ?? [openstack-dev] [Ceilometer][Gnocchi]Gnocchi cannot deal 
with combined resource-id ?

 

On Sat, Sep 12 2015, Luo Gangyi wrote:

>  I checked it again, no "ignored" is marked, seems the bug of devstack ;(

I was talking about that:

  
https://git.openstack.org/cgit/openstack/ceilometer/tree/etc/ceilometer/gnocchi_resources.yaml#n67

>  And it's OK that gnocchi is not perfect now, but I still have some worries 
> about how gnocchi deal with or going to deal with instance--tapxxx 
> condition.
>  I see 'network.incoming.bytes' belongs to resouce type 'instance'.
>  But no attributes of instance can save the infomation of tap name.
>  Although I can search
>  all metric ids from resouce id(instance uuid), how do I distinguish them 
> from different taps of an instance?

Where do you see network.incoming.bytes as being linked to an instance?
Reading gnocchi_resources.yaml I don't see that.

-- 
Julien Danjou
-- Free Software hacker
-- http://julien.danjou.info__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Ceilometer][Gnocchi] Gnocchi cannot deal with combined resource-id ?

2015-09-11 Thread Chris Dent

On Fri, 11 Sep 2015, Luo Gangyi wrote:


I am using master branch and newest code for testing.

For the purpose for learning the structure of gnocchi, I changed the
default UUID type of mysql from binary to char, so I can easily link
the resource-id(I mean in database), metric id and directory name of
storing measures.

When I did that, I found all the metrics where their resource id is
combined(here, I mean in Ceilometer, such as instance-xxx-tap)
have no measures stored.


In addition to the things that Julien has said, one thing that is
non-obvious about how gnocchi stores resources is that if the
incoming ID is _not_ a UUID then a uuid5 hash is created based on the id
provided. So if your resource has an ceilometer-side id of 'instance-xxx-
tap' it will be saved in the database in a form like 
5B0A4989-44C3-46D1-A1ED-
4705062F51A2. The code review for that change is here:
https://review.openstack.org/#/c/216390/

With that change in place you can still use the 'instance-xxx-tap' ID
in the  part of /v1/metric/resource// URLs and in
search queries.

But as pointed out elsewhere in the thread at least some of your
resources are missing because of the 'display_name' attribute being
dropped.

--
Chris Dent tw:@anticdent freenode:cdent
https://tank.peermore.com/tanks/cdent

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] ?????? [Ceilometer][Gnocchi] Gnocchi cannot deal with combined resource-id ?

2015-09-11 Thread Luo Gangyi
Thanks Julien :)
  
 >  But I don't think Ceilometer has this metric posted to Gnocchi yet, the
>  code is a bit young and not finished on the Ceilometer side. If you
>  check gnocchi_resources.yaml, it's still marked "ignored" for now.
  
 I checked it again, no "ignored" is marked, seems the bug of devstack ;(
  
 And it's OK that gnocchi is not perfect now, but I still have some worries 
about how gnocchi deal with or going to deal with instance--tapxxx 
condition.
 I see 'network.incoming.bytes' belongs to resouce type 'instance'. But no 
attributes of instance can save the infomation of tap name. Although I can 
search
 all metric ids from resouce id(instance uuid), how do I distinguish them from 
different taps of an instance?
  --
 Luo Gangyi   luogan...@cmss.chinamobile.com



  
  

 

 --  --
  ??: "Julien Danjou";;
 : 2015??9??12??(??) 0:01
 ??: "Luo Gangyi"; 
 : "OpenStack Development Mailing L"; 
 : Re: [openstack-dev] [Ceilometer][Gnocchi] Gnocchi cannot deal with 
combined resource-id ?

 

On Fri, Sep 11 2015, Luo Gangyi wrote:

Hi Gangyi,

>  I am using master branch and newest code for testing.

Cool.

>  For the purpose for learning the structure of gnocchi, I changed the
>  default UUID type of mysql from binary to char, so I can easily link
>  the resource-id(I mean in database), metric id and directory name of
>  storing measures.

Bah, don't do that ?C and rather use PostgreSQL, it's the recommended
backend. :)

>  When I did that, I found all the metrics where their resource id is
>  combined(here, I mean in Ceilometer, such as instance-xxx-tap)
>  have no measures stored.


>  Log in Ceilometer collector records this:
>  "
>  2015-09-11 07:55:55.097 10636 ERROR ceilometer.dispatcher.gnocchi [-] 
> Resource 
> instance-0001-4641f59e-994c-4255-b0ec-43a276d1c19c-tap8aadb7ad-d7 
> creation failed with status: 400: 
>  
>   400 Bad Request
>  
>  
>   400 Bad Request
>   The server could not comply with the request since it is either malformed 
> or otherwise incorrect.
> Invalid input: required key not provided @ data['display_name']
>   
> 
>
>  "
>  So I wander whether gnocchi cannot deal with such combined resource-id 
> metrics or whether it is because I change the UUID type or whatever.

Yes, it can, but the problem is more likely in the Ceilometer collector
dispatcher code that is sending the data. From the error you have, it
seems it tries to create an instance but it has no value for
display_name, so it is denied by Gnocchi. If this is from a standard
devstack installation, I'd suggest to open a bug on Ceilometer.

>  And another question is how to query measures for those metrics whose
>  resource id is combined.

They are resource on their own so if you know their id you can just
access the metrics at /v1/resources///metric//measures.

>  For example, I want to query the network traffic of an vm, I know the
>  instance uuid -, I know metric name
>  'network.incoming.byte.rate' but I do not know the exact resouce_id
>  and metric id. What procedure should I do ?

You need to know the ID of the resource and then ask for its metric on
the REST interface. If you don't know the ID of the resource, you can
search for it by instance id.

But I don't think Ceilometer has this metric posted to Gnocchi yet, the
code is a bit young and not finished on the Ceilometer side. If you
check gnocchi_resources.yaml, it's still marked "ignored" for now.

-- 
Julien Danjou
;; Free Software hacker
;; http://julien.danjou.info__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Ceilometer][Gnocchi] Gnocchi cannot deal with combined resource-id ?

2015-09-11 Thread Julien Danjou
On Fri, Sep 11 2015, Luo Gangyi wrote:

Hi Gangyi,

>  I am using master branch and newest code for testing.

Cool.

>  For the purpose for learning the structure of gnocchi, I changed the
>  default UUID type of mysql from binary to char, so I can easily link
>  the resource-id(I mean in database), metric id and directory name of
>  storing measures.

Bah, don't do that – and rather use PostgreSQL, it's the recommended
backend. :)

>  When I did that, I found all the metrics where their resource id is
>  combined(here, I mean in Ceilometer, such as instance-xxx-tap)
>  have no measures stored.


>  Log in Ceilometer collector records this:
>  "
>  2015-09-11 07:55:55.097 10636 ERROR ceilometer.dispatcher.gnocchi [-] 
> Resource 
> instance-0001-4641f59e-994c-4255-b0ec-43a276d1c19c-tap8aadb7ad-d7 
> creation failed with status: 400: 
>  
>   400 Bad Request
>  
>  
>   400 Bad Request
>   The server could not comply with the request since it is either malformed 
> or otherwise incorrect.
> Invalid input: required key not provided @ data['display_name']
>   
> 
>
>  "
>  So I wander whether gnocchi cannot deal with such combined resource-id 
> metrics or whether it is because I change the UUID type or whatever.

Yes, it can, but the problem is more likely in the Ceilometer collector
dispatcher code that is sending the data. From the error you have, it
seems it tries to create an instance but it has no value for
display_name, so it is denied by Gnocchi. If this is from a standard
devstack installation, I'd suggest to open a bug on Ceilometer.

>  And another question is how to query measures for those metrics whose
>  resource id is combined.

They are resource on their own so if you know their id you can just
access the metrics at /v1/resources///metric//measures.

>  For example, I want to query the network traffic of an vm, I know the
>  instance uuid -, I know metric name
>  'network.incoming.byte.rate' but I do not know the exact resouce_id
>  and metric id. What procedure should I do ?

You need to know the ID of the resource and then ask for its metric on
the REST interface. If you don't know the ID of the resource, you can
search for it by instance id.

But I don't think Ceilometer has this metric posted to Gnocchi yet, the
code is a bit young and not finished on the Ceilometer side. If you
check gnocchi_resources.yaml, it's still marked "ignored" for now.

-- 
Julien Danjou
;; Free Software hacker
;; http://julien.danjou.info


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Ceilometer][Gnocchi] Gnocchi cannot deal with combined resource-id ?

2015-09-11 Thread Luo Gangyi
Hi, Julien
  
 I am using master branch and newest code for testing.
  
 For the purpose for learning the structure of gnocchi, I changed the default 
UUID type of mysql from binary to char, so I can easily link the resource-id(I 
mean in database), metric id and directory name of storing measures.
  
 When I did that, I found all the metrics where their resource id is 
combined(here, I mean in Ceilometer, such as instance-xxx-tap) have no 
measures stored.
  
 Log in Ceilometer collector records this:
 "
 2015-09-11 07:55:55.097 10636 ERROR ceilometer.dispatcher.gnocchi [-] Resource 
instance-0001-4641f59e-994c-4255-b0ec-43a276d1c19c-tap8aadb7ad-d7 creation 
failed with status: 400: 
 
  400 Bad Request
 
 
  400 Bad Request
  The server could not comply with the request since it is either malformed or 
otherwise incorrect.
Invalid input: required key not provided @ data['display_name']
  


 "
 So I wander whether gnocchi cannot deal with such combined resource-id metrics 
or whether it is because I change the UUID type or whatever.
  
 And another question is how to query measures for those metrics whose resource 
id is combined.
  
 For example, I want to query the network traffic of an vm, I know the instance 
uuid -, I know metric name 'network.incoming.byte.rate' but I do not 
know the exact resouce_id and metric id. What procedure should I do ? 
  --
 Luo Gangyi   luogan...@cmss.chinamobile.com



  
  

 

 -- Original --
  From:  "Julien Danjou";;
 Date:  Fri, Sep 11, 2015 06:31 PM
 To:  "Luo Gangyi"; 
 Cc:  "OpenStack Development Mailing L"; 
 Subject:  Re: [openstack-dev] [Ceilometer][Gnocchi] Gnocchi cannot deal with 
combined resource-id ?

 

On Fri, Sep 11 2015, Luo Gangyi wrote:

Hi Luo,

> I find that gnocchi cannot deal with combined resource-id such as
> instance-xx-tapxx or instance--vda. I'm not sure whether it is my
> configuration problem or just bug.

Which version are you testing? The master branch has no support for
resource ID that are not UUID.

> And if such combined resource-id can be processed correctly, what about its
> metadata(or called attributes)? In current design, gnocchi seems treat
> instance-aaa, instance-aaa-tap111, instance-aaa-tap222 as equal although they
> have parent-child relationship and share many attributes.

We just merged support for those resources. We do not store any
attribute other than the name and parent instance AFAICS. What do you
miss as an attribute exactly?

-- 
Julien Danjou
# Free Software hacker
# http://julien.danjou.info__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Ceilometer][Gnocchi] Gnocchi cannot deal with combined resource-id ?

2015-09-11 Thread Julien Danjou
On Fri, Sep 11 2015, Julien Danjou wrote:

> Which version are you testing? The master branch has no support for

s/no/now/

-- 
Julien Danjou
-- Free Software hacker
-- http://julien.danjou.info


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Ceilometer][Gnocchi] Gnocchi cannot deal with combined resource-id ?

2015-09-11 Thread Julien Danjou
On Fri, Sep 11 2015, Luo Gangyi wrote:

Hi Luo,

> I find that gnocchi cannot deal with combined resource-id such as
> instance-xx-tapxx or instance--vda. I'm not sure whether it is my
> configuration problem or just bug.

Which version are you testing? The master branch has no support for
resource ID that are not UUID.

> And if such combined resource-id can be processed correctly, what about its
> metadata(or called attributes)? In current design, gnocchi seems treat
> instance-aaa, instance-aaa-tap111, instance-aaa-tap222 as equal although they
> have parent-child relationship and share many attributes.

We just merged support for those resources. We do not store any
attribute other than the name and parent instance AFAICS. What do you
miss as an attribute exactly?

-- 
Julien Danjou
# Free Software hacker
# http://julien.danjou.info


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Ceilometer][Gnocchi] Gnocchi cannot deal with combined resource-id ?

2015-09-11 Thread Luo Gangyi
Hi devs,


I am trying Ceilometer with gnocchi. 


I find that gnocchi cannot deal with combined resource-id such as 
instance-xx-tapxx or instance--vda. I'm not sure whether it is my 
configuration problem or just bug.


And if such combined resource-id can be processed correctly, what about its 
metadata(or called attributes)? In current design, gnocchi seems treat 
instance-aaa, instance-aaa-tap111,   instance-aaa-tap222 as equal although they 
have parent-child relationship and share many attributes.


Is anyone else have the same problem and concern?



--
Luo gangyiluogan...@chinamobile.com__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev