gnocchi dispatcher doesn't work for resource-type "instance" (SOLVED)

asked 2017-06-01 02:43:01 -0500

updated 2017-06-01 06:50:59 -0500

Hi there! My Setup is an Ocata Openstack cluster with nova,neutron,heat,cinder,glance and ceilometer/gnocchi on ubuntu xenial.

I've installed everything from the ubuntu-cloud.archive first, now I am trying the stable/ocata branch for ceilometer from git. Everything works fine, except the "type: instance" metrics are not getting into gnocchi.dispatcher. ceilometer-collector Error is e.g.: ERROR ceilometer.dispatcher.gnocchi [-] Error creating resource 6124c75b-ed7c-4cb3-82e1-98bfd36af874: Invalid input: required key not provided @ data[u'flavor_id'] (HTTP 400)

The part in the gnoccchi_resources.yaml responsible for the flavor_id key would be:

 - resource_type: instance
    metrics:
      - 'instance'
      - 'memory'
      - 'memory.usage'
      - 'memory.resident'
      - 'vcpus'
      - 'cpu'
      - 'cpu.delta'
      - 'cpu_util'
      - 'disk.root.size'
      - 'disk.ephemeral.size'
      - 'disk.read.requests'
      - 'disk.read.requests.rate'
      - 'disk.write.requests'
      - 'disk.write.requests.rate'
      - 'disk.read.bytes'
      - 'disk.read.bytes.rate'
      - 'disk.write.bytes'
      - 'disk.write.bytes.rate'
      - 'disk.latency'
      - 'disk.iops'
      - 'disk.capacity'
      - 'disk.allocation'
      - 'disk.usage'
    attributes:
      host: resource_metadata.host
      image_ref: resource_metadata.image_ref
      display_name: resource_metadata.display_name
      flavor_id: resource_metadata.(instance_flavor_id|(flavor.id))
[...]

the gnocchi dispatcher parameters inside ceilometer.conf are

[DEFAULT]   
    meter_dispatchers=gnocchi
    event_dispatchers=gnocchi 
[dispatcher_gnocchi]  
     filter_project=service  
     filter_service_activity =False 
     archive_policy = low 
     resources_definition_file=gnocchi_resources.yaml

Only thing, it's just not happening. I have resources like instance_disk or network, or numerous others, but no resource of type instance. The type itself of course does exist. Any suggestions?

THX a lot Frank

UPDATE:

I'm now able to meter resources of type "instance" as well. It obviously is an issue with the instance_discovery_method for the compute polling agent. The libvirt_metada seems not to work, so I've switched back to workload_partitioning.

[compute]
workload_partitioning=true

instance_discovery_method = workload_partitioning

Don't know if both lines are needed, but will not harm anyhow.

So, my working setup now is:

removed ceilometer-collector from controller(s).
changed puplisher inside ceilometer/pipeline.yml from "notifier://" to "gnocchi://" ( Everywhere, where polling agents run)
and changed the method as mentioned above.

It seems to be related to the libvirt Version on the ubuntu xenial servers. I'll investigate some more and may open a bug with ceilometer.

Cheers

Frank

edit retag flag offensive close merge delete

Comments

Hi, I am using openstack Ocata version. Can you please tell me version of

gnocchi==3.1.4

gnocchiclient==2.8.2

ceilometer==8.1.2

python-ceilometerclient==2.8.0 I am getting this error ResourceNotFound: Resource type ceph_account does not exist (HTTP 404) while running ceilometer-upgrad.

Bhautik gravatar imageBhautik ( 2018-01-16 06:33:23 -0500 )edit