Wednesday, 2021-02-24

*** djhankb has quit IRC06:26
zigomkarpiarz: I can't see it, is the issue gone?08:19
zigomkarpiarz: Adding "force_granularity: 300" seems to do the trick indeed. However, I'm still getting Rate=0 when I do "cloudkitty summary get", when it really should be counting my instance uptime.08:28
mkarpiarzzigo: This is a different problem. Have you set up hashmaps for metrics you want to do rating for?10:10
mkarpiarzHave you added your cloudkitty user to the project you want to bill with the "rating" role?10:12
mkarpiarzIs your "scope_key" set to "project_id" in cloudkitty.conf?10:14
mkarpiarzPlease read https://github.com/mkarpiarz/cloudkitty-playground/blob/gnocchi-collector/README.adoc10:15
zigomkarpiarz: This is the first time I'm hearing about scope_key ....10:58
zigomkarpiarz: Yes, my rating role is correct.10:58
zigoI know also because cloudkitty-processor.log shows the number of projects that needs to be billed, and it's correct.10:59
zigoI also have stuff in the "cloudkitty dataframe get", but each entry is showing rate=0.10:59
zigomkarpiarz: I have this:11:01
zigohttp://paste.openstack.org/show/802955/11:01
zigoMust I have "Service ID" with the UUID of my "compute" service ?11:02
zigoOr is it fine with "None" ?11:02
priteauHum, the service ID should match a hashmap service using the name of the metric11:05
zigopriteau: That's what I thought, thanks !11:32
zigopriteau: So, I shall edit the DB and put the service id UUID ?11:32
zigoThe example here: https://docs.openstack.org/cloudkitty/latest/user/rating/hashmap.html11:32
zigodoesn't tell about the service UUID at all...11:32
zigoAlso, in the hashmap_mappings, can I use the flavor names, or must I use their UUID ?11:34
zigo(I did both because I wasn't sure...)11:36
priteauYou should probably use the CLI instead of database edits11:50
priteauThere is an example of creating a service at https://docs.openstack.org/cloudkitty/latest/user/rating/hashmap.html#instance-uptime11:50
priteauFor the mapping, it depends if you're matching against flavor_id or flavor_name11:50
priteauYou have to check what's provided by your data source11:50
priteauI believe it's flavor_id in Gnocchi nowadays11:51
zigopriteau: The example doesn't show using --service-id ...12:38
*** vishalmanchanda has joined #cloudkitty12:46
zigopriteau: About 2 years ago, I knew how to do it, but I forgot. How can I make cloudkitty-processor restart all calculation from scratch ? (so I don't need to wait 1h to know if my configuration is ok...)12:47
zigoCan I just delete the content of the dataframes table?12:47
openstackgerritThomas Goirand proposed openstack/cloudkitty master: Set force_granularity: 300 in metrics.yml  https://review.opendev.org/c/openstack/cloudkitty/+/77737912:54
zigoLooks like the processor finaly works for me ! :)13:02
zigoI had to restart it though, not sure why.13:02
zigomkarpiarz: priteau: We thought about displaying the cloudkitty rating price in Horizon. Do you think it'd be a good idea? Should this go in the cloudkitty plugin then?13:08
mkarpiarzzigo: I'm glad this is working for you now!13:18
zigoThanks a lot for your help.13:19
zigoI'll have to wait until the end of the hour to make sure everything's ok though ... :P13:19
zigoFYI, installing cloudkitty and billing is currently fully a part of my installer at https://salsa.debian.org/openstack-team/debian/openstack-cluster-installer13:19
zigo(which is in Debian)13:20
zigoI probably will need to reinstall everything to re-validate all though.13:20
mkarpiarzIf you see metrics in the dataframes, you should be good. Code that is transforming these to 1h billing points is the same for all backends and it's been working in my test environment and some production envs too.13:23
mkarpiarzHave you tried using Kolla for deploying Cloudkitty (and OpenStack as a whole) or are you guys required to use your Debian installer?13:24
mkarpiarzAs for displaying ratings in Horizon, have you looked into the cloudkitty-dashboard plugin for Horizon?13:26
mkarpiarzhttps://opendev.org/openstack/cloudkitty-dashboard13:26
mkarpiarzThis plugin comes with only very basic graphs but one of them shows changes in rating cost and looks like this one:13:28
mkarpiarzhttps://github.com/mkarpiarz/cloudkitty-playground/blob/cost-per-service-per-h-graph/images/cloudkittydashboard_cost_per_service_per_hour_graph_area_unstacked.png13:28
mkarpiarzIf you have ideas for improving existing graphs or adding more, we will be happy to review (and eventually merge) any patches you submit to cloudkitty-dashboard. :)13:30
*** vishalmanchanda has quit IRC16:36
openstackgerritRafael Weingartner proposed openstack/cloudkitty master: Deprecate `state` field and propose `last_processed_at` field  https://review.opendev.org/c/openstack/cloudkitty/+/77463416:48
openstackgerritMerged openstack/cloudkitty-specs master: Add "active" column to storage scope, and API to manage it  https://review.opendev.org/c/openstack/cloudkitty-specs/+/77092816:58
openstackgerritRafael Weingartner proposed openstack/cloudkitty master: Add active status fields in the storage state table  https://review.opendev.org/c/openstack/cloudkitty/+/77744217:48
openstackgerritRafael Weingartner proposed openstack/cloudkitty master: Deprecate `state` field and propose `last_processed_at` field  https://review.opendev.org/c/openstack/cloudkitty/+/77463417:53
zigomkarpiarz: I'm the author of that Debian installer (and also the package maintainer of all OpenStack in Debian), so I'm not *required* to use the installer, I just do use what I wrote in production... :)19:25
zigomkarpiarz: As for the cloudkitty-dashboard, I do package it in Debian and install it too in my cluster.19:25
zigoHowever, what I am talking about is having the price of the instances in the "Launch instance" panel of Horizon...19:26
zigoI don't think that's available in the cloudkitty plugin, is it?19:26
zigoWe potentially would like to contribute that feature.19:26
CeeMaczigo: that should be there is you've configured the services and hashmaps. If you follow through the hands on slides it walks through an example of setting this up https://olib.re/denver-ck-handson19:51
zigoCeeMac: I see the rating user panel on the left, with how much consumed, and such, though when clicking on "Launch instance" there's no price written in the flavor sub-screen.20:29
CeeMacAnd you have the hashmaps etc all set up?20:33
zigoCeeMac: Yes, and cloudkitty is correctly calculating the price for instance uptime.20:34
CeeMacHmm odd. I'll double check on my aio tomorrow20:34
zigoOh, at the end...20:35
zigoCeeMac: My bad, I missed it...20:35
zigoCeeMac: Though it says $0.00 ... :/20:36
zigoI would have expect the price to be displayed in the Flavor list.20:37
zigoAlso, printing a $ in front isn't best, not everyone uses $ ...20:38
zigoI guess that's easy to patch though... :)20:38
CeeMacDid you set the ratings?20:38
zigoCeeMac: Yes I did.20:39
CeeMacNot sure how to change currency if it picks up the region settings on the server or not20:39
CeeMacIirc it should increase as you select an appropriate rated image, flavor etc20:39
zigoCeeMac: That's the thing, not everyone even use a "currency". We're planning to use Cloudkitty with its own unit that will *not* be a real world money.20:40
zigoCeeMac: Oh, I haven't set any rating for the images though ...20:40
zigoIs this mandatory ?20:40
zigoI did only for flavors.20:40
CeeMacIt's been a while since I last looked at it, just starting to work through the process again myself20:40
zigo:)20:40
CeeMacBut yeah I see your point about the currency, being able to be arbitrary about it could be useful20:41
zigoYeah, in our case, we will see in both EUR and CHF, maybe also USD (not sure), so it doesn't make sense to print the cloudkitty unit as any kind of currency, it's going to be just "units" for us ... :)20:42
zigoCeeMac: I see that cloudkitty needs to read /etc/cloudkitty/metrics.yml so we get a list of services. Though, what if I want to add another type? Let's say, whenever a customer reserves a port on an internal subnet that has public IPs (for technical reasons, these wont be floating IPs), or a subnet on a certain network ?20:44
CeeMacTbh I'm not sure off the top of my head, sorry.20:54
CeeMacI guess as long as gnocchi is polling an appropriate metric you should be able to collect and rate it with the right config in metrics.yml20:55
zigoCeeMac: Yeah, I'm also reading about ceilometer polster stuff ...21:00
zigoI guess I'm far from finished with all of this ! :)21:00
CeeMacThere are a lot of moving parts!21:01
zigoYeah.21:01
CeeMacUltimately you need to be collecting the metrics you need, aggregating and archiving them appropriately then you can rate them as required. Using some kind of magic :D21:02
zigoRight.21:03
CeeMacLooks like network wise by default you only have network.bw.in, network.bw.out and network.floating21:07
CeeMacI guess you can add custom metrics some how21:14
CeeMacSo if you can collect the right metric for port activation in the required subnet, and work out what that metric is called when it gets to gnocchi you can reference that in metrics.yml to set your rate?21:17
CeeMachttps://docs.openstack.org/cloudkitty/latest/admin/configuration/collector.html#minimal-configuration21:17
CeeMaczigo: looking at the available ceilometer measures for network I think you'd need to employ dynamic pollsters for pulling your port/subnet reservations22:21
zigoCeeMac: Indeed, that's what I think too.22:24
CeeMacNow all you need to do is work out the api path and which returned values give you the info you need. Simples >_<22:25
*** djhankb has joined #cloudkitty22:31
zigoCeeMac: I never wrote a custom polster. If I understand well, I need to write it in /etc/ceilometer/pollsters.d, and then reference it in /etc/ceilometer/polling.yaml, right ?22:48
CeeMacI think you just need the *.yml file(s) in pollsters.d22:53
CeeMacOh, no, wait. Yeah I think you need to configure the push in polling.yml as well, you were right zigo22:55
zigo:)22:55
CeeMacThen also in metrics.yml to collect it in cloudkitty :)22:58
zigoI'll first attempt to write the pollster, then I'll see for the cloudkitty part.22:59
zigoCeeMac: Thanks a lot for your advice.22:59
CeeMacNo problem, I hope you work it out. It's good to talk these things through when you're trying to figure things out.23:00

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!