[Yoga][Cloudkitty] Some projects have their rate to 0 on some services
wodel youchi
wodel.youchi at gmail.com
Thu Nov 3 18:05:02 UTC 2022
Hi,
I deployed Cloudkitty with the following metrics.yml file :
metrics:
cpu:
unit: instance
alt_name: instance
groupby:
- id
- user_id
- project_id
metadata:
- flavor_name
- flavor_id
- vcpus
mutate: NUMBOOL
extra_args:
aggregation_method: mean
resource_type: instance
force_granularity: 300
image.size:
unit: MiB
factor: 1/1048576
groupby:
- id
- user_id
- project_id
metadata:
- container_format
- disk_format
extra_args:
aggregation_method: mean
resource_type: image
force_granularity: 300
* volume.size: unit: GiB groupby: - id - user_id -
project_id metadata: - volume_type extra_args:
aggregation_method: mean resource_type: volume force_granularity:
300*
I created a service for volume.size following the example here :
https://docs.openstack.org/cloudkitty/yoga/user/rating/hashmap.html
I added the user cloudkitty to the admin project and to another project
named Project01.
When showing the rates I have 0 rate on the Project01.
For example :
executing this command : * openstack rating dataframes get | grep
volume.size*
This volume belongs to an instance in the Admin project, as you can see
rating is 4.5:
| 2022-11-02T18:25:00 | 2022-11-02T18:30:00 |
31bfb5bcf7b7413da269d7a35a2fe69a |* [{'rating': '4.5', 'service':
'volume.size*', 'desc': {'volume_type':
'246853e3-1215-4147-aef2-54012221ecc9', 'id': '
*07811807-474a-4eb5-91b5-ce2dcdd7be26*', 'project_id':
'31bfb5bcf7b7413da269d7a35a2fe69a', 'user_id':
'2a3f2478e334473e85527102b76f7a2e'}, 'volume': '3.0', 'rate_value':
'1.5000'}, {'rating': '4.5', 'service': 'volume.size', 'desc':
{'volume_type': '246853e3-1215-4147-aef2-54012221ecc9', 'id':
'8a345711-0486-4733-b8bc-fd1966678aec', 'project_id':
'31bfb5bcf7b7413da269d7a35a2fe69a', 'user_id':
'2a3f2478e334473e85527102b76f7a2e'}, 'volume': '3.0', 'rate_value':
'1.5000'}, {'rating': '4.5', 'service': 'volume.size', 'desc':
{'volume_type': '246853e3-1215-4147-aef2-54012221ecc9', 'id':
'afd22819-8faa-47ee-8c09-75290d2cf18e', 'project_id':
'31bfb5bcf7b7413da269d7a35a2fe69a', 'user_id':
'2a3f2478e334473e85527102b76f7a2e'}, 'volume': '3.0', 'rate_value':
'1.5000'}]
This volume belongs to an instance in the Project01 project, as you can see
rating is 0.0 :
| 2022-11-03T10:35:00 | 2022-11-03T10:40:00 |
2e80eb3b3d344ef9993065ce689395d9 | *[{'rating': '0.0'*, 'service':
'volume.size', 'desc': {'volume_type':
'246853e3-1215-4147-aef2-54012221ecc9', 'id': '
*1c396d46-8954-4e8c-b3e8-8e5e4eb6aba4*', 'project_id':
'2e80eb3b3d344ef9993065ce689395d9', 'user_id':
'd9e5696e99954ae1ac87db9cca82c839'}, 'volume': '20.0', 'rate_value':
'0.0000'}]
I don't understand why it works for one and not the other?
More info :
(yogavenv) [deployer at rscdeployer ~]$ openstack rating hashmap service list
+------------------------+--------------------------------------+
| Name | Service ID |
+------------------------+--------------------------------------+
| instance | 06e17b49-8cd4-4cb9-8965-cb929ee12909 |
| network.incoming.bytes | 634069b2-ca42-4a28-8778-ac69144fcc23 |
| network.outgoing.bytes | 6c1fdaa7-15cb-41b4-be0e-109d64810dde |
| volume.size | b6934ab1-8326-4281-89b9-f80294430321 |
| image.size | d3652e08-8645-45fd-b7db-b710ae716876 |
+------------------------+--------------------------------------+
(yogavenv) [deployer at rscdeployer ~]$ openstack rating hashmap mapping list
-s b6934ab1-8326-4281-89b9-f80294430321
+--------------------------------------+-------+--------------------------------+------+----------+--------------------------------------+----------+------------+
| Mapping ID | Value | Cost
| Type | Field ID | Service ID |* Group ID |
Project ID* |
+--------------------------------------+-------+--------------------------------+------+----------+--------------------------------------+----------+------------+
| f81aea1e-0651-4c0a-b043-496fdd892635 | None |
1.5000000000000000000000000000 | flat | None |
b6934ab1-8326-4281-89b9-f80294430321 | *None | None * |
+--------------------------------------+-------+--------------------------------+------+----------+--------------------------------------+----------+------------+
Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.openstack.org/pipermail/openstack-discuss/attachments/20221103/70ffa163/attachment.htm>
More information about the openstack-discuss
mailing list