<div dir="ltr">What is the CloudKitty fetcher that you are using?<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 3, 2022 at 3:11 PM wodel youchi <<a href="mailto:wodel.youchi@gmail.com">wodel.youchi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I deployed Cloudkitty with the following metrics.yml file :</div><div>metrics:<br>  cpu:<br>    unit: instance<br>    alt_name: instance<br>    groupby:<br>      - id<br>      - user_id<br>      - project_id<br>    metadata:<br>      - flavor_name<br>      - flavor_id<br>      - vcpus<br>    mutate: NUMBOOL<br>    extra_args:<br>      aggregation_method: mean<br>      resource_type: instance<br>      force_granularity: 300<br><br>  image.size:<br>    unit: MiB<br>    factor: 1/1048576<br>    groupby:<br>      - id<br>      - user_id<br>      - project_id<br>    metadata:<br>      - container_format<br>      - disk_format<br>    extra_args:<br>      aggregation_method: mean<br>      resource_type: image<br>      force_granularity: 300</div><div><br></div><div> <b> volume.size:<br>    unit: GiB<br>    groupby:<br>      - id<br>      - user_id<br>      - project_id<br>    metadata:<br>      - volume_type<br>    extra_args:<br>      aggregation_method: mean<br>      resource_type: volume<br>      force_granularity: 300</b><br><br><br></div><div><br></div><div>I created a service for volume.size following the example here : <a href="https://docs.openstack.org/cloudkitty/yoga/user/rating/hashmap.html" target="_blank">https://docs.openstack.org/cloudkitty/yoga/user/rating/hashmap.html</a></div><div><br></div><div>I added the user cloudkitty to the admin project and to another project named Project01.</div><div><br></div><div>When showing the rates I have 0 rate on the Project01.</div><div><br></div><div><br></div><div></div><div>For example :<br></div><div>executing this command : <b> openstack rating dataframes get | grep volume.size</b></div><div><br></div><div>This volume belongs to an instance in the Admin project, as you can see rating is 4.5:<br></div><div>| 2022-11-02T18:25:00 | 2022-11-02T18:30:00 | 31bfb5bcf7b7413da269d7a35a2fe69a |<b> [{'rating': '4.5', 'service': 'volume.size</b>', 'desc': {'volume_type': '246853e3-1215-4147-aef2-54012221ecc9', 'id': '<b>07811807-474a-4eb5-91b5-ce2dcdd7be26</b>', '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'}]</div><div><br></div><div>This volume belongs 
to an instance in the Project01 project, as you can see rating is 0.0 :

</div><div>| 2022-11-03T10:35:00 | 2022-11-03T10:40:00 | 2e80eb3b3d344ef9993065ce689395d9 | <b>[{'rating': '0.0'</b>, 'service': 'volume.size', 'desc': {'volume_type': '246853e3-1215-4147-aef2-54012221ecc9', 'id': '<b>1c396d46-8954-4e8c-b3e8-8e5e4eb6aba4</b>', 'project_id': '2e80eb3b3d344ef9993065ce689395d9', 'user_id': 'd9e5696e99954ae1ac87db9cca82c839'}, 'volume': '20.0', 'rate_value': '0.0000'}] </div><div><br></div><div>I don't understand why it works for one and not the other?<br></div><div><br></div><div>More info :</div><div>(yogavenv) [deployer@rscdeployer ~]$ openstack rating hashmap service list<br><span style="font-family:monospace">+------------------------+--------------------------------------+<br>| Name                   | Service ID                           |<br>+------------------------+--------------------------------------+<br>| instance               | 06e17b49-8cd4-4cb9-8965-cb929ee12909 |<br>| network.incoming.bytes | 634069b2-ca42-4a28-8778-ac69144fcc23 |<br>| network.outgoing.bytes | 6c1fdaa7-15cb-41b4-be0e-109d64810dde |<br>| volume.size            | b6934ab1-8326-4281-89b9-f80294430321 |<br>| image.size             | d3652e08-8645-45fd-b7db-b710ae716876 |<br>+------------------------+--------------------------------------+</span></div><div><br></div><div><br></div><div><span style="font-family:monospace">(yogavenv) [deployer@rscdeployer ~]$ openstack rating hashmap mapping list -s b6934ab1-8326-4281-89b9-f80294430321<br>+--------------------------------------+-------+--------------------------------+------+----------+--------------------------------------+----------+------------+<br>| Mapping ID                           | Value | Cost                           | Type | Field ID | Service ID                           |<b> Group ID | Project ID</b> |<br>+--------------------------------------+-------+--------------------------------+------+----------+--------------------------------------+----------+------------+<br>| f81aea1e-0651-4c0a-b043-496fdd892635 | None  | 1.5000000000000000000000000000 | flat | None     | b6934ab1-8326-4281-89b9-f80294430321 | <b>None     | None  </b>     |<br>+--------------------------------------+-------+--------------------------------+------+----------+--------------------------------------+----------+------------+</span></div><div><br></div><div>Regards.<br></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Rafael Weingärtner</div></div>