*** vishalmanchanda has joined #cloudkitty | 05:04 | |
*** evrardjp has quit IRC | 05:33 | |
*** evrardjp has joined #cloudkitty | 05:33 | |
*** sboyron has joined #cloudkitty | 07:55 | |
zigo | Hi. | 10:18 |
---|---|---|
zigo | How can I check that the tenant fetcher is really finding my users, and that metrics from Telemetry are going in? | 10:18 |
zigo | I can't get rating to work... :/ | 10:19 |
zigo | When I do "gnocchi metrics list" I do see something. Is there anything I can do further to check? | 10:22 |
*** vishalmanchanda has quit IRC | 10:22 | |
*** vishalmanchanda has joined #cloudkitty | 10:30 | |
*** vishalmanchanda has quit IRC | 13:52 | |
mkarpiarz | zigo: For fetchers, you should set "debug" to True in your Cloudkitty config and then you will see a line like this one in the cloudkitty-processor logs: | 13:54 |
mkarpiarz | [Worker: 0] Tenants loaded for fetcher keystone | 13:55 |
zigo | I do see it: [Worker: 0] Tenants loaded for fetcher keystone | 13:56 |
zigo | mkarpiarz: But "cloudkitty report tenant list" shows an empty list... | 13:56 |
mkarpiarz | Have a loot at this patch: | 13:58 |
mkarpiarz | https://opendev.org/openstack/cloudkitty/commit/4900e5d4ba9c1b927a2e6d1081dbdccb3b613c41 | 13:58 |
mkarpiarz | Forgot to add that this line shows up even when no tenant hae been fetched. ;) | 13:59 |
mkarpiarz | Check your Cloudkitty config. Do you have "[fetcher_keystone]" or "[keystone_fetcher]" there? | 14:02 |
mkarpiarz | As for confirming metric collection, you can query the InfluxDB database Cloudkitty is using. | 14:04 |
mkarpiarz | use cloudkitty; | 14:04 |
mkarpiarz | SELECT * FROM dataframes ORDER BY time DESC LIMIT 5; | 14:04 |
zigo | 0 tenants loaded for fetcher keystone ... :/ | 14:05 |
zigo | I have [fetcher]/backend=keystone | 14:05 |
zigo | I'm using Ceph as backend, not influx. | 14:06 |
zigo | Influx is unfortunately non-free in the cluster flavor... | 14:06 |
mkarpiarz | Ah, but you are using Ceph for Gnocchi metrics, right? | 14:09 |
mkarpiarz | These you should be able to see using the Gnocchi API. | 14:09 |
mkarpiarz | Have you seen this: https://github.com/mkarpiarz/cloudkitty-playground/tree/gnocchi-collector ? | 14:10 |
mkarpiarz | metric_uuid=$(openstack metric list -f value | grep vcpus | cut -d' ' -f1) | 14:11 |
mkarpiarz | openstack metric measures show ${metric_uuid} | 14:11 |
mkarpiarz | This should show you a list with measurements for Gnocchi metrics. | 14:11 |
mkarpiarz | (well, for the "vpus" metric) | 14:12 |
mkarpiarz | Cloudkitty will query your datastore with metrics (Gnocchi in this case) and store records for billable metrics in one supported databases: | 14:16 |
mkarpiarz | https://docs.openstack.org/cloudkitty/latest/admin/configuration/storage.html | 14:16 |
mkarpiarz | Only influxdb and elasticsearch are supported for storage backend v2. | 14:16 |
mkarpiarz | Back to the fetcher, in a working env I can see these are set: | 14:19 |
mkarpiarz | [fetcher_keystone]/keystone_version = 3/auth_section = keystone_authtoken/region_name = RegionOne | 14:20 |
mkarpiarz | And in the "[keystone_authtoken]" section I have auth_url, username, password, etc. | 14:21 |
zigo | Thanks, I'll try. | 14:23 |
mkarpiarz | Also, have you added the "rating" role to the user you want to bill? | 14:23 |
zigo | And let you know. | 14:23 |
zigo | Yes, I have. | 14:23 |
zigo | Currently, for the "admin" user (before I do for the others...). | 14:23 |
zigo | I do see measures: | 14:24 |
zigo | # openstack metric measures show a4962215-a802-4436-ac16-623fbb4e2381 | 14:24 |
zigo | +---------------------------+-------------+-------+ | 14:24 |
zigo | | timestamp | granularity | value | | 14:24 |
zigo | +---------------------------+-------------+-------+ | 14:24 |
zigo | | 2020-12-15T11:00:00+00:00 | 300.0 | 2.0 | | 14:24 |
zigo | | 2020-12-15T12:00:00+00:00 | 300.0 | 2.0 | | 14:24 |
zigo | | 2020-12-15T13:00:00+00:00 | 300.0 | 2.0 | | 14:24 |
zigo | | 2020-12-15T14:00:00+00:00 | 300.0 | 2.0 | | 14:24 |
zigo | +---------------------------+-------------+-------+ | 14:24 |
mkarpiarz | Yeah, this confirms metrics are there in Gnocchi. | 14:25 |
zigo | I do have [fetcher_keystone] | 14:25 |
zigo | keystone_version=3 | 14:25 |
zigo | auth_section=keystone_authtoken | 14:25 |
mkarpiarz | Check credentials in the keystone_authtoken section then. | 14:27 |
zigo | It would yell... | 14:29 |
mkarpiarz | Was this the command you run to add the rating role to admin? | 14:30 |
mkarpiarz | openstack role add --user cloudkitty --project admin rating | 14:30 |
zigo | Is the problem that I don't have the right coordinator URL ? | 14:30 |
zigo | openstack role add --user admin --project admin rating | 14:30 |
mkarpiarz | Aha! | 14:31 |
mkarpiarz | And what's the username set to in [keystone_authtoken]? | 14:32 |
mkarpiarz | cloudkitty or admin? | 14:32 |
zigo | cloudkitty ... | 14:35 |
zigo | Ok, so this? | 14:36 |
zigo | openstack role add --user cloudkitty --project services rating | 14:36 |
mkarpiarz | Yes. | 14:36 |
zigo | Ok, I'm adding this to my notes at https://salsa.debian.org/openstack-team/debian/openstack-cluster-installer#enabling-cloudkitty-rating then. | 14:36 |
zigo | :) | 14:38 |
mkarpiarz | https://github.com/mkarpiarz/cloudkitty-playground/blob/gnocchi-collector/README.adoc | 14:38 |
zigo | Yeah, that was it !!! :) | 14:38 |
zigo | Thanks. | 14:38 |
zigo | It looks like the processor is ... well ... processing ! :) | 14:38 |
mkarpiarz | Cool! | 14:39 |
mkarpiarz | Now you need to write a definition for the metric you want to bill and create a hashmap mapping. | 14:40 |
mkarpiarz | All commands you need should be in the README file I linked. | 14:40 |
mkarpiarz | And a sample metric definition is here: | 14:41 |
mkarpiarz | https://github.com/mkarpiarz/cloudkitty-playground/blob/gnocchi-collector/kolla/config/cloudkitty/metrics.yml | 14:41 |
mkarpiarz | Bear in mind offcial docs have sensible samples for metric definitions with Gnocchi as the collector. | 14:42 |
zigo | I did ... | 14:43 |
zigo | mkarpiarz: I did this: https://salsa.debian.org/openstack-team/debian/openstack-cluster-installer#add-billing | 14:43 |
zigo | Though I'm still getting no rating for the admin user. | 14:44 |
zigo | Maybe it will work better with a non-admin user ? | 14:44 |
* zigo tries to create a new project and spawn a vm. | 14:44 | |
zigo | I'll also fix the coordinator URL to get the 3 processors to work ... | 14:45 |
mkarpiarz | Sure. | 14:47 |
zigo | Oh, I know why it's wrong, it looks like the directive changed. | 14:47 |
zigo | mkarpiarz: Do you happen to know when it went from [coordination]/backend_url to [orchestrator]/coordination_url ? | 14:48 |
zigo | I mean, what OpenStack release ... | 14:48 |
mkarpiarz | No idea. | 14:49 |
zigo | Never mind, I'll set both directives in my puppet ... :P | 14:49 |
mkarpiarz | There should be a note in release notes I'd expect. | 14:50 |
mkarpiarz | Good job spotting this. :) | 14:51 |
* zigo rebuilds the cloudkitty package with the number of tenant patch, and uploads it to Debian unstable | 14:53 | |
zigo | mkarpiarz: Does the processor know when there's a new admin to bill, or shall it be restarted each time I'm adding a new customer? | 14:55 |
*** sboyron has quit IRC | 14:56 | |
mkarpiarz | You mean when you add the rating role to more projects? I think this check runs on each metric poll, so no need to restart, but can't guarantee that. | 15:02 |
*** sboyron has joined #cloudkitty | 15:14 | |
*** sboyron has quit IRC | 15:51 | |
*** sboyron has joined #cloudkitty | 15:52 | |
openstackgerrit | Ghanshyam proposed openstack/cloudkitty master: [goal] Deprecate the JSON formatted policy file https://review.opendev.org/c/openstack/cloudkitty/+/766842 | 18:27 |
*** sboyron has quit IRC | 21:02 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!