Thanks Matthias, for your response!
I have confirmed that the desired fields are there in the event definition(s).
Let me elaborate the issue:
- Blazar leases can contain one or multiple reservations.
- These reservations are in the form of list of dictionaries with the same keys in all the items of this dictionary, as provided in the below-mentioned sample payload data.
- Since the current Ceilometer configuration can process only the first item from this reservations list, but is not able to iterate over the rest of the items from this "reservations" list.
- Hence, only one Gnocchi resource metric for the first item of this "reservations" list is getting created.
- However, I want to have a Gnocchi resource metric explicitly for every key of each item in this reservations list of dictionaries, that too, based on the value of "resource_type" key available in each item of this "reservations" list of dictionaries.
- Please find the attached override file for ceilometer.
Following metrics are getting created successfully:
- blazar.lease.create
- blazar.lease.start
- blazar.lease.before_end
- blazar.lease.end
- blazar.lease.delete
But, following metrics for which volume is requried from the reservations list, are not getting created, for each reservation item in the list:
- blazar.reservation.instance.vcpus (Virtual Host Reservation Metrics, i.e for resource_type='virtual:instance')
- blazar.reservation.host.max (Physical Host Reservation Metrics, i.e for resource_type='physical:host')
Could you please provide a solution for this!
Sample data for resource_type='virtual:instance':'payload':
{
'lease_id': 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa',
'user_id': '2cf63f4ecf7740f5ac9ef4adfa4cdf5e',
'project_id': '07f1a09ab11543bb9080d260a98d812c',
'trust_id': '0037eb9121f04cdc94c39628a8354dde',
'start_date': '2025-12-15T16:18:00.000000',
'end_date': '2025-12-15T16:22:00.000000',
'status': 'PENDING',
'reservations':
[
{
'id': '1fffeb17-599d-441a-80e0-ca6d9044fd36', 'lease_id': 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa', 'resource_id': 'c9daade3-4a85-4122-bec2-f34b7a849a01', 'resource_type': 'virtual:instance', 'status': 'pending', 'missing_resources': False, 'resources_changed': False, 'created_at': '2025-12-15 16:18:07', 'updated_at': '2025-12-15 16:18:10', 'vcpus': 1, 'memory_mb': 1024, 'disk_gb': 20, 'amount': 1, 'affinity': None, 'resource_properties': '', 'flavor_id': '1fffeb17-599d-441a-80e0-ca6d9044fd36', 'aggregate_id': 292, 'server_group_id': None
},
{
'id': '97df8162-d756-44c0-a27f-c832101577e8', 'lease_id': 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa', 'resource_id': '4a3e20b1-5f63-46b1-a61b-13a267fd829a', 'resource_type': 'virtual:instance', 'status': 'pending', 'missing_resources': False, 'resources_changed': False, 'created_at': '2025-12-15 16:18:05', 'updated_at': '2025-12-15 16:18:07', 'vcpus': 1, 'memory_mb': 1024, 'disk_gb': 20, 'amount': 1, 'affinity': None, 'resource_properties': '', 'flavor_id': '97df8162-d756-44c0-a27f-c832101577e8', 'aggregate_id': 291, 'server_group_id': None
}
],
'events': [{'id': '4cea5a4f-53f4-4a69-969b-74a5869c7ab1', 'lease_id': 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa', 'event_type': 'end_lease', 'time': '2025-12-15T16:22:00.000000', 'status': 'UNDONE', 'created_at': '2025-12-15 16:18:10', 'updated_at': None}, {'id': '63b51fc9-5eca-4729-8f5e-a3659e7db24b', 'lease_id': 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa', 'event_type': 'start_lease', 'time': '2025-12-15T16:18:00.000000', 'status': 'UNDONE', 'created_at': '2025-12-15 16:18:10', 'updated_at': None}, {'id': 'bba382f6-47d8-4bb0-b3aa-0a65c6959ed9', 'lease_id': 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa', 'event_type': 'before_end_lease', 'time': '2025-12-15T16:18:00.000000', 'status': 'UNDONE', 'created_at': '2025-12-15 16:18:10', 'updated_at': None}],
'name': 'lease-short-ins',
'created_at': '2025-12-15 16:18:05',
'updated_at': '2025-12-15 16:18:10',
'degraded': False
}
Sample data for resource_type='physical:host':'payload':
{'lease_id': 'f85d7719-5690-425b-8f8b-691269c7a4dc', 'user_id': '2cf63f4ecf7740f5ac9ef4adfa4cdf5e', 'project_id': '07f1a09ab11543bb9080d260a98d812c', 'trust_id': '7d0733ec688b4e12917331e26d869f5f', 'start_date': '2025-12-02T15:23:00.000000', 'end_date': '2025-12-02T15:42:00.000000', 'status': 'PENDING',
'reservations':
[{'id': 'aa587866-8724-4064-874a-b86f94dc3569', 'lease_id': 'f85d7719-5690-425b-8f8b-691269c7a4dc', 'resource_id': '5bc508f2-76bf-4a29-96a8-7bd819232dbc', 'resource_type': 'physical:host', 'status': 'pending', 'missing_resources': False, 'resources_changed': False, 'created_at': '2025-12-02 15:23:07', 'updated_at': '2025-12-02 15:23:08', 'hypervisor_properties': '[">=", "$vcpus", "2"]', 'resource_properties': '', 'before_end': 'default', 'min': 1, 'max': 1}],
'events': [{'id': '296759f6-4263-4671-9426-667597381f21', 'lease_id': 'f85d7719-5690-425b-8f8b-691269c7a4dc', 'event_type': 'before_end_lease', 'time': '2025-12-02T15:23:00.000000', 'status': 'UNDONE', 'created_at': '2025-12-02 15:23:08', 'updated_at': None}, {'id': '5e94efc1-c280-4be4-a475-f7fd297f850d', 'lease_id': 'f85d7719-5690-425b-8f8b-691269c7a4dc', 'event_type': 'start_lease', 'time': '2025-12-02T15:23:00.000000', 'status': 'UNDONE', 'created_at': '2025-12-02 15:23:08', 'updated_at': None}, {'id': 'c5c3c8fa-d02a-47e7-b11b-581f4c2df04c', 'lease_id': 'f85d7719-5690-425b-8f8b-691269c7a4dc', 'event_type': 'end_lease', 'time': '2025-12-02T15:42:00.000000', 'status': 'UNDONE', 'created_at': '2025-12-02 15:23:08', 'updated_at': None}], 'name': 'lease-test-comp-host-res', 'created_at': '2025-12-02 15:23:07', 'updated_at': '2025-12-02 15:23:08', 'degraded': False}
Thanks & Best Regards,
Nitin Gupta
Am 05.01.26 um 08:51 schrieb NITIN GUPTA:
> Hello Ceilometer Team,
>
> Could you please check and confirm, how to create ceilometer metrics for
> list fields in event payloads when creating Gnocchi resources?
>
> Br,
> Nitin Gupta
You may want to check
https://github.com/openstack/ceilometer/blob/master/ceilometer/pipeline/data/event_definitions.yaml
and make sure that the event definitions you use also contains the
desired fields.
Matthias
>
> On Tue, Dec 23, 2025 at 9:08 PM NITIN GUPTA <nitin291989@gmail.com
> <mailto:nitin291989@gmail.com>> wrote:
>
> Hello Ceilometer Team!
> Good Day! Could you please suggest, how to create ceilometer metrics
> for list fields in event payloads when creating Gnocchi resources?
> Looks like Ceilometer doesn't iterate over list fields in event
> payloads when creating Gnocchi resources. Is this a known issue?
> >From the below Sample payload, I'm looking to create a separate
> metric for "vcpus" field (for example) from each item in
> "reservations", which is a list of dictionary type of data in the
> payload. 'payload':
> {
> 'lease_id': 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa',
> 'user_id': '2cf63f4ecf7740f5ac9ef4adfa4cdf5e',
> 'project_id': '07f1a09ab11543bb9080d260a98d812c',
> 'trust_id': '0037eb9121f04cdc94c39628a8354dde',
> 'start_date': '2025-12-15T16:18:00.000000',
> 'end_date': '2025-12-15T16:22:00.000000',
> 'status': 'PENDING',
> '*reservations*':
> [
> {
> 'id': '1fffeb17-599d-441a-80e0-ca6d9044fd36', 'lease_id':
> 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa', 'resource_id':
> 'c9daade3-4a85-4122-bec2-f34b7a849a01', 'resource_type':
> 'virtual:instance', 'status': 'pending', 'missing_resources': False,
> 'resources_changed': False, 'created_at': '2025-12-15 16:18:07',
> 'updated_at': '2025-12-15 16:18:10', '*vcpus*': 1, 'memory_mb':
> 1024, 'disk_gb': 20, 'amount': 1, 'affinity': None,
> 'resource_properties': '', 'flavor_id': '1fffeb17-599d-441a-80e0-
> ca6d9044fd36', 'aggregate_id': 292, 'server_group_id': None
> },
> {
> 'id': '97df8162-d756-44c0-a27f-c832101577e8', 'lease_id':
> 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa', 'resource_id':
> '4a3e20b1-5f63-46b1-a61b-13a267fd829a', 'resource_type':
> 'virtual:instance', 'status': 'pending', 'missing_resources': False,
> 'resources_changed': False, 'created_at': '2025-12-15 16:18:05',
> 'updated_at': '2025-12-15 16:18:07', '*vcpus*': 1, 'memory_mb':
> 1024, 'disk_gb': 20, 'amount': 1, 'affinity': None,
> 'resource_properties': '', 'flavor_id': '97df8162-d756-44c0-a27f-
> c832101577e8', 'aggregate_id': 291, 'server_group_id': None
> }
> ],
> 'events': [{'id': '4cea5a4f-53f4-4a69-969b-74a5869c7ab1',
> 'lease_id': 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa', 'event_type':
> 'end_lease', 'time': '2025-12-15T16:22:00.000000', 'status':
> 'UNDONE', 'created_at': '2025-12-15 16:18:10', 'updated_at': None},
> {'id': '63b51fc9-5eca-4729-8f5e-a3659e7db24b', 'lease_id':
> 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa', 'event_type': 'start_lease',
> 'time': '2025-12-15T16:18:00.000000', 'status': 'UNDONE',
> 'created_at': '2025-12-15 16:18:10', 'updated_at': None}, {'id':
> 'bba382f6-47d8-4bb0-b3aa-0a65c6959ed9', 'lease_id':
> 'f94182be-70e2-4f3f-bc8d-a1d1c2eea0aa', 'event_type':
> 'before_end_lease', 'time': '2025-12-15T16:18:00.000000', 'status':
> 'UNDONE', 'created_at': '2025-12-15 16:18:10', 'updated_at': None}],
> 'name': 'lease-short-ins',
> 'created_at': '2025-12-15 16:18:05',
> 'updated_at': '2025-12-15 16:18:10',
> 'degraded': False
> }
> Best regards.
> --
> NITIN GUPTA
>
>
>
> --
> NITIN GUPTA
--