Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexible client configuration #95

Open
anlek opened this issue Nov 4, 2019 · 2 comments
Open

More flexible client configuration #95

anlek opened this issue Nov 4, 2019 · 2 comments

Comments

@anlek
Copy link
Contributor

anlek commented Nov 4, 2019

With the following config:

InfluxDB::Rails.configure do |config|
  config.client.hosts = ['localhost']
  config.client.port = 8086
  config.client.username = 'root'
  config.client.password = 'pa$$word'
  config.client.auth_method = 'basic_auth'

When my app loads, I get a undefined method 'auth_method=' for #<InfluxDB::Rails::ClientConfig:0x000055af834ef718> (NoMethodError)

However, if I remove it and enter a rails console, I can set it to InfluxDB::Rails.client.config.auth_method = 'basic_auth' and am able to write_point without any issues.

Am I missing something?

@hennevogel
Copy link
Collaborator

I guess we shouldn't hardcode client configuration and allow anything you want to pass in so we don't have to run after influxdb-ruby options.

@hennevogel hennevogel changed the title It seems I'm unable to set the auth_method value More flexible client configuration Nov 6, 2019
@radiospiel
Copy link

👍 on this. That this gem only allows a limited number of configuration options is no benefit to any user. Also, if influxdb-ruby ever changes configuration on their end this gem must follow suit, or else it becomes unusable.

@rubhanazeem rubhanazeem self-assigned this Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants