telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

Openstack plugin - allow metrics-gathering by non-admin OSP accounts

Open rplevka opened this issue 2 years ago • 1 comments

Use Case

telegraf version: v1.23.2 input plugin: openstack

My OSP account does not have permissions to list the services, but it is perfectly capable of accessing other services API.

The current implementation of the plugin seem to rely on the calls to <auth_endpoint>/v3/services, rendering the plugin unusable with non-admin accounts.

Not sure what the request is used for, but the service catalog object is retrieved automatically after a successful authentication with the keystone service: https://docs.openstack.org/keystone/latest/api_curl_examples.html

maybe parsing this catalog should be sufficient?

Expected behavior

admin permissions should not be required, service catalog should be parsed from the keystone authentication response

Actual behavior

plugin trying to gather the services by accessing the endpoint that requires admin privileges

Additional info

No response

rplevka avatar Sep 06 '22 11:09 rplevka

@singamSrikar - any thoughts on this approach?

powersj avatar Sep 07 '22 13:09 powersj

@rplevka please test the PR in #15468 and let me know if that works for you!

srebhan avatar Jun 10 '24 21:06 srebhan

@srebhan hi, commented under the PR. The changes seem to work nicely. Thank you!

rplevka avatar Jun 11 '24 08:06 rplevka