Bug 2187255

Summary: [RHOSP 17.1] Make ceilometer metrics format human-friendly
Product: Red Hat OpenStack Reporter: Yadnesh Kulkarni <ykulkarn>
Component: openstack-ceilometerAssignee: Yadnesh Kulkarni <ykulkarn>
Status: CLOSED ERRATA QA Contact: Leonid Natapov <lnatapov>
Severity: high Docs Contact: mgeary <mgeary>
Priority: high    
Version: 13.0 (Queens)CC: apevec, augol, csibbitt, dhruv, eduen, jelynch, jlema, joflynn, lmadsen, lnatapov, mgeary, mmagr, mrunge, pveiga
Target Milestone: betaKeywords: Triaged, UserExperience
Target Release: 17.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-ceilometer-16.0.2-1.20230428061013.7dbb69e.el9ost Doc Type: Enhancement
Doc Text:
With this update, you can add project and user name fields to outgoing data collection service (ceilometer) metrics. Previously, cloud administrators had to rely on UUIDs of projects and users to identify tenants. Now you can view a list of projects and user names, not UUIDs. + NOTE: This feature is not available to use with gnocchi or Service Telemetry Framework (STF).
Story Points: ---
Clone Of: 1959796 Environment:
Last Closed: 2023-08-16 01:14:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1959796    
Bug Blocks:    

Comment 11 Leonid Natapov 2023-05-29 14:52:57 UTC
from the logs:


{"name": "disk.device.write.bytes", "type": "cumulative", "unit": "B", "volume": 253952, "user_id": "7592b8b456eb461c8a94b13cf5246da3", "user_name": null, "project_id": "4f8f1eb9541a4d5aa423b3f93f10cbcf", "project_name": null, "resource_id": "6ff07965-7f93-4cc9-8fba-bed26abe9f29-vda", "timestamp": "2023-05-29T14:51:15.937547", "resource_metadata": {"display_name": "workload_instance_0", "name": "instance-00000002", "instance_id": "6ff07965-7f93-4cc9-8fba-bed26abe9f29", "instance_type": "workload_flavor_0", "host": "cbd5cc0f3795650577433ff55f05e76f5c0eb5f230fb7be1496d3e47", "instance_host": "compute-1.redhat.local", "flavor": {"id": "7d5f9af7-9023-4cba-9285-b73344d5f64a", "name": "workload_flavor_0", "vcpus": 1, "ram": 512, "disk": 5, "ephemeral": 0, "swap": 0}, "status": "active", "state": "running", "task_state": "", "image": {"id": "391e21d9-54f2-483f-a800-0c496f0ac245"}, "image_ref": "391e21d9-54f2-483f-a800-0c496f0ac245", "image_ref_url": null, "architecture": "x86_64", "os_type": "hvm", "vcpus": 1, "memory_mb": 512, "disk_gb": 5, "ephemeral_gb": 0, "root_gb": 5, "disk_name": "vda"}, "source": "openstack", "id": "434d4f8e-fe30-11ed-bc65-525400acacfa", "monotonic_time": null}



you can see that user_name and project_name fields are present.

Comment 12 Chris Sibbitt 2023-05-29 18:58:38 UTC
I'm seeing non-null user_id and project_id fields, but null in the _name fields. I'm wondering if maybe this is what happens if you don't add `CeilometerEnableTenantDiscovery: True`? It would be nice to see non-null examples working.

Comment 13 Leonid Natapov 2023-06-02 06:46:43 UTC
(In reply to Chris Sibbitt from comment #12)
> I'm seeing non-null user_id and project_id fields, but null in the _name
> fields. I'm wondering if maybe this is what happens if you don't add
> `CeilometerEnableTenantDiscovery: True`? It would be nice to see non-null
> examples working.

Thanks for noticing this,Chris.

Here you go.

"name": "image.size", "type": "gauge", "unit": "B", "volume": 16300544, "user_id": null, "user_name": null, "project_id": "4f8f1eb9541a4d5aa423b3f93f10cbcf", "project_name": "admin", "resource_id": "0467092e-3dea-4786-971e-b4c7f596011b", "timestamp": "2023-05-29T20:15:49.094103", "resource_metadata": {"status": "active", "visibility": "shared", "name": "workload_image_1", "container_format": "bare", "created_at": "2023-05-28T16:44:04Z", "disk_format": "qcow2", "updated_at": "2023-05-28T16:44:06Z", "min_disk": 0, "protected": false, "checksum": "b874c39491a2377b8490f5f1e89761a4", "min_ram": 0, "tags": [], "virtual_size": 117440512}, "source": "openstack", "id": "9a35283a-fe5d-11ed-b73d-525400e8fd55", "monotonic_time": null}



"user_id": null, "user_name": null, "project_id": "4f8f1eb9541a4d5aa423b3f93f10cbcf", "project_name": "admin",

Comment 25 errata-xmlrpc 2023-08-16 01:14:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.1 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2023:4577