[Ceilometer] Dynamic pollsters : dot in JSON keyname

Taltavull Jean-François jean-francois.taltavull at elca.ch
Wed Oct 12 15:17:43 UTC 2022


Hello Rafael,

To get the the size, in GB, occupied by buckets I need to manipulate a JSON key which contains a dot in its name:

````
- name: "radosgw.containers.objects.size"
  sample_type: "gauge"
  unit: "B"
  value_attribute: "rgw.main.size"  <------------------------------------"rgw.main" is a JSON key, with a dot in its name, which belongs to "bucket.usage" JSON container 
  url_path: "http://FQDN/admin/bucket?stats=True"
  module: "awsauth"
  authentication_object: "S3Auth"
  authentication_parameters: my_access_key,my_secret_key,FQDN
  user_id_attribute: "owner"
  project_id_attribute: "tenant"
  resource_id_attribute: "id"
  response_entries_key: "usage"
````

But with this dynamic pollster definition, I get the python error "KeyError: 'rgw' ".

In this case, is there a specific syntax to define "value_attribute" or am I doing something the wrong way ?


Jean-Francois



More information about the openstack-discuss mailing list