*** djhankb has quit IRC | 06:26 | |
zigo | mkarpiarz: I can't see it, is the issue gone? | 08:19 |
---|---|---|
zigo | mkarpiarz: 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 |
mkarpiarz | zigo: This is a different problem. Have you set up hashmaps for metrics you want to do rating for? | 10:10 |
mkarpiarz | Have you added your cloudkitty user to the project you want to bill with the "rating" role? | 10:12 |
mkarpiarz | Is your "scope_key" set to "project_id" in cloudkitty.conf? | 10:14 |
mkarpiarz | Please read https://github.com/mkarpiarz/cloudkitty-playground/blob/gnocchi-collector/README.adoc | 10:15 |
zigo | mkarpiarz: This is the first time I'm hearing about scope_key .... | 10:58 |
zigo | mkarpiarz: Yes, my rating role is correct. | 10:58 |
zigo | I know also because cloudkitty-processor.log shows the number of projects that needs to be billed, and it's correct. | 10:59 |
zigo | I also have stuff in the "cloudkitty dataframe get", but each entry is showing rate=0. | 10:59 |
zigo | mkarpiarz: I have this: | 11:01 |
zigo | http://paste.openstack.org/show/802955/ | 11:01 |
zigo | Must I have "Service ID" with the UUID of my "compute" service ? | 11:02 |
zigo | Or is it fine with "None" ? | 11:02 |
priteau | Hum, the service ID should match a hashmap service using the name of the metric | 11:05 |
zigo | priteau: That's what I thought, thanks ! | 11:32 |
zigo | priteau: So, I shall edit the DB and put the service id UUID ? | 11:32 |
zigo | The example here: https://docs.openstack.org/cloudkitty/latest/user/rating/hashmap.html | 11:32 |
zigo | doesn't tell about the service UUID at all... | 11:32 |
zigo | Also, 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 |
priteau | You should probably use the CLI instead of database edits | 11:50 |
priteau | There is an example of creating a service at https://docs.openstack.org/cloudkitty/latest/user/rating/hashmap.html#instance-uptime | 11:50 |
priteau | For the mapping, it depends if you're matching against flavor_id or flavor_name | 11:50 |
priteau | You have to check what's provided by your data source | 11:50 |
priteau | I believe it's flavor_id in Gnocchi nowadays | 11:51 |
zigo | priteau: The example doesn't show using --service-id ... | 12:38 |
*** vishalmanchanda has joined #cloudkitty | 12:46 | |
zigo | priteau: 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 |
zigo | Can I just delete the content of the dataframes table? | 12:47 |
openstackgerrit | Thomas Goirand proposed openstack/cloudkitty master: Set force_granularity: 300 in metrics.yml https://review.opendev.org/c/openstack/cloudkitty/+/777379 | 12:54 |
zigo | Looks like the processor finaly works for me ! :) | 13:02 |
zigo | I had to restart it though, not sure why. | 13:02 |
zigo | mkarpiarz: 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 |
mkarpiarz | zigo: I'm glad this is working for you now! | 13:18 |
zigo | Thanks a lot for your help. | 13:19 |
zigo | I'll have to wait until the end of the hour to make sure everything's ok though ... :P | 13:19 |
zigo | FYI, installing cloudkitty and billing is currently fully a part of my installer at https://salsa.debian.org/openstack-team/debian/openstack-cluster-installer | 13:19 |
zigo | (which is in Debian) | 13:20 |
zigo | I probably will need to reinstall everything to re-validate all though. | 13:20 |
mkarpiarz | If 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 |
mkarpiarz | Have you tried using Kolla for deploying Cloudkitty (and OpenStack as a whole) or are you guys required to use your Debian installer? | 13:24 |
mkarpiarz | As for displaying ratings in Horizon, have you looked into the cloudkitty-dashboard plugin for Horizon? | 13:26 |
mkarpiarz | https://opendev.org/openstack/cloudkitty-dashboard | 13:26 |
mkarpiarz | This plugin comes with only very basic graphs but one of them shows changes in rating cost and looks like this one: | 13:28 |
mkarpiarz | https://github.com/mkarpiarz/cloudkitty-playground/blob/cost-per-service-per-h-graph/images/cloudkittydashboard_cost_per_service_per_hour_graph_area_unstacked.png | 13:28 |
mkarpiarz | If 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 IRC | 16:36 | |
openstackgerrit | Rafael Weingartner proposed openstack/cloudkitty master: Deprecate `state` field and propose `last_processed_at` field https://review.opendev.org/c/openstack/cloudkitty/+/774634 | 16:48 |
openstackgerrit | Merged openstack/cloudkitty-specs master: Add "active" column to storage scope, and API to manage it https://review.opendev.org/c/openstack/cloudkitty-specs/+/770928 | 16:58 |
openstackgerrit | Rafael Weingartner proposed openstack/cloudkitty master: Add active status fields in the storage state table https://review.opendev.org/c/openstack/cloudkitty/+/777442 | 17:48 |
openstackgerrit | Rafael Weingartner proposed openstack/cloudkitty master: Deprecate `state` field and propose `last_processed_at` field https://review.opendev.org/c/openstack/cloudkitty/+/774634 | 17:53 |
zigo | mkarpiarz: 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 |
zigo | mkarpiarz: As for the cloudkitty-dashboard, I do package it in Debian and install it too in my cluster. | 19:25 |
zigo | However, what I am talking about is having the price of the instances in the "Launch instance" panel of Horizon... | 19:26 |
zigo | I don't think that's available in the cloudkitty plugin, is it? | 19:26 |
zigo | We potentially would like to contribute that feature. | 19:26 |
CeeMac | zigo: 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-handson | 19:51 |
zigo | CeeMac: 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 |
CeeMac | And you have the hashmaps etc all set up? | 20:33 |
zigo | CeeMac: Yes, and cloudkitty is correctly calculating the price for instance uptime. | 20:34 |
CeeMac | Hmm odd. I'll double check on my aio tomorrow | 20:34 |
zigo | Oh, at the end... | 20:35 |
zigo | CeeMac: My bad, I missed it... | 20:35 |
zigo | CeeMac: Though it says $0.00 ... :/ | 20:36 |
zigo | I would have expect the price to be displayed in the Flavor list. | 20:37 |
zigo | Also, printing a $ in front isn't best, not everyone uses $ ... | 20:38 |
zigo | I guess that's easy to patch though... :) | 20:38 |
CeeMac | Did you set the ratings? | 20:38 |
zigo | CeeMac: Yes I did. | 20:39 |
CeeMac | Not sure how to change currency if it picks up the region settings on the server or not | 20:39 |
CeeMac | Iirc it should increase as you select an appropriate rated image, flavor etc | 20:39 |
zigo | CeeMac: 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 |
zigo | CeeMac: Oh, I haven't set any rating for the images though ... | 20:40 |
zigo | Is this mandatory ? | 20:40 |
zigo | I did only for flavors. | 20:40 |
CeeMac | It's been a while since I last looked at it, just starting to work through the process again myself | 20:40 |
zigo | :) | 20:40 |
CeeMac | But yeah I see your point about the currency, being able to be arbitrary about it could be useful | 20:41 |
zigo | Yeah, 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 |
zigo | CeeMac: 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 |
CeeMac | Tbh I'm not sure off the top of my head, sorry. | 20:54 |
CeeMac | I 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.yml | 20:55 |
zigo | CeeMac: Yeah, I'm also reading about ceilometer polster stuff ... | 21:00 |
zigo | I guess I'm far from finished with all of this ! :) | 21:00 |
CeeMac | There are a lot of moving parts! | 21:01 |
zigo | Yeah. | 21:01 |
CeeMac | Ultimately 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 :D | 21:02 |
zigo | Right. | 21:03 |
CeeMac | Looks like network wise by default you only have network.bw.in, network.bw.out and network.floating | 21:07 |
CeeMac | I guess you can add custom metrics some how | 21:14 |
CeeMac | So 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 |
CeeMac | https://docs.openstack.org/cloudkitty/latest/admin/configuration/collector.html#minimal-configuration | 21:17 |
CeeMac | zigo: looking at the available ceilometer measures for network I think you'd need to employ dynamic pollsters for pulling your port/subnet reservations | 22:21 |
zigo | CeeMac: Indeed, that's what I think too. | 22:24 |
CeeMac | Now 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 #cloudkitty | 22:31 | |
zigo | CeeMac: 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 |
CeeMac | I think you just need the *.yml file(s) in pollsters.d | 22:53 |
CeeMac | Oh, no, wait. Yeah I think you need to configure the push in polling.yml as well, you were right zigo | 22:55 |
zigo | :) | 22:55 |
CeeMac | Then also in metrics.yml to collect it in cloudkitty :) | 22:58 |
zigo | I'll first attempt to write the pollster, then I'll see for the cloudkitty part. | 22:59 |
zigo | CeeMac: Thanks a lot for your advice. | 22:59 |
CeeMac | No 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/!