[cloudkitty] question to the scope_key in cloudkitty
Hello! I am currently trying to get CloudKitty to work with the Prometheus Collector and PyScripts. I noticed that the scope_key for Prometheus can only be changed once in the global configuration file. This was a problem for me because we need different scope_keys for different metrics. Many of the metrics still need the scope key "tenant_id" and some others "project_id". I have found in the documentation of CloudKitty no way to change this for each metric, so I have internally changed something in the source code and added the function to set the scope_key for each metric individually. I just wanted to ask if you would be interested if I submit the small change upstream? Thank you. Regards Noah Feldt
Hello Noah, Even though we do not see a use case for the feature you described, you seem to have a solid use case. Other approaches could have been used to "rename"/"map" tenant_id to project_id, such as with Dynamic pollsters in Ceilometer. However, the argument you present seems solid to me. I would say that if you open a patch, we would happily review it :). AS long as things are backwards compatible, tested, and well documented, we would for sure merge it. On Mon, Feb 20, 2023 at 10:39 AM Noah Elias Feldt <N.Feldt@mittwald.de> wrote:
Hello! I am currently trying to get CloudKitty to work with the Prometheus Collector and PyScripts. I noticed that the scope_key for Prometheus can only be changed once in the global configuration file. This was a problem for me because we need different scope_keys for different metrics. Many of the metrics still need the scope key "tenant_id" and some others "project_id". I have found in the documentation of CloudKitty no way to change this for each metric, so I have internally changed something in the source code and added the function to set the scope_key for each metric individually. I just wanted to ask if you would be interested if I submit the small change upstream? Thank you. Regards
Noah Feldt
-- Rafael Weingärtner
Hello Noah, Are you still interested in contributing your code change? It would be really useful when using metrics from different Prometheus exporters which may not be using the same labels. The contributor docs are here: https://docs.openstack.org/cloudkitty/latest/contributor/contributing.html Thanks, Pierre Riteau (priteau) On Mon, 20 Feb 2023 at 18:55, Rafael Weingärtner < rafaelweingartner@gmail.com> wrote:
Hello Noah, Even though we do not see a use case for the feature you described, you seem to have a solid use case. Other approaches could have been used to "rename"/"map" tenant_id to project_id, such as with Dynamic pollsters in Ceilometer. However, the argument you present seems solid to me.
I would say that if you open a patch, we would happily review it :). AS long as things are backwards compatible, tested, and well documented, we would for sure merge it.
On Mon, Feb 20, 2023 at 10:39 AM Noah Elias Feldt <N.Feldt@mittwald.de> wrote:
Hello! I am currently trying to get CloudKitty to work with the Prometheus Collector and PyScripts. I noticed that the scope_key for Prometheus can only be changed once in the global configuration file. This was a problem for me because we need different scope_keys for different metrics. Many of the metrics still need the scope key "tenant_id" and some others "project_id". I have found in the documentation of CloudKitty no way to change this for each metric, so I have internally changed something in the source code and added the function to set the scope_key for each metric individually. I just wanted to ask if you would be interested if I submit the small change upstream? Thank you. Regards
Noah Feldt
-- Rafael Weingärtner
Hello Pierre, Currently we use a workaround by simply rewriting the labels via Prometheus. But I could still commit the change, which would also be an advantage for us. I will take care of it in the next days. Regards, Noah Feldt _____ Mittwald CM Service GmbH & Co. KG Königsberger Straße 4-6 32339 Espelkamp Tel.: 05772 / 293-100 Fax: 05772 / 293-333 support@mittwald.de https://www.mittwald.de Geschäftsführer: Robert Meyer, Florian Jürgens USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen Informationen zur Datenverarbeitung im Rahmen unserer Geschäftstätigkeit gemäß Art. 13-14 DSGVO sind unter www.mittwald.de/ds abrufbar. ________________________________________ Von: Pierre Riteau <pierre@stackhpc.com> Gesendet: Montag, 17. Juli 2023 22:10:30 An: Noah Elias Feldt Cc: openstack-discuss@lists.openstack.org; Rafael Weingärtner Betreff: Re: [cloudkitty] question to the scope_key in cloudkitty Hello Noah, Are you still interested in contributing your code change? It would be really useful when using metrics from different Prometheus exporters which may not be using the same labels. The contributor docs are here: https://docs.openstack.org/cloudkitty/latest/contributor/contributing.html Thanks, Pierre Riteau (priteau) On Mon, 20 Feb 2023 at 18:55, Rafael Weingärtner <rafaelweingartner@gmail.com<mailto:rafaelweingartner@gmail.com>> wrote: Hello Noah, Even though we do not see a use case for the feature you described, you seem to have a solid use case. Other approaches could have been used to "rename"/"map" tenant_id to project_id, such as with Dynamic pollsters in Ceilometer. However, the argument you present seems solid to me. I would say that if you open a patch, we would happily review it :). AS long as things are backwards compatible, tested, and well documented, we would for sure merge it. On Mon, Feb 20, 2023 at 10:39 AM Noah Elias Feldt <N.Feldt@mittwald.de<mailto:N.Feldt@mittwald.de>> wrote: Hello! I am currently trying to get CloudKitty to work with the Prometheus Collector and PyScripts. I noticed that the scope_key for Prometheus can only be changed once in the global configuration file. This was a problem for me because we need different scope_keys for different metrics. Many of the metrics still need the scope key "tenant_id" and some others "project_id". I have found in the documentation of CloudKitty no way to change this for each metric, so I have internally changed something in the source code and added the function to set the scope_key for each metric individually. I just wanted to ask if you would be interested if I submit the small change upstream? Thank you. Regards Noah Feldt -- Rafael Weingärtner
participants (3)
-
Noah Elias Feldt
-
Pierre Riteau
-
Rafael Weingärtner