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

Smoother influx CLI intergration #73

Open
SimonHoenscheid opened this issue Feb 27, 2023 · 4 comments
Open

Smoother influx CLI intergration #73

SimonHoenscheid opened this issue Feb 27, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@SimonHoenscheid
Copy link
Contributor

Use Case

The InfluxDB Module creates a SSL encrypted setup by default, which is great. But this seup creates two pitfalls with the influx CLI:

  1. The CLI needs additional parameters to be able to establish a connection. This can be solved with an influx CLI config

influx config create --config-name default --host-url https://$(facter networking.fqdn):8086 --org puppetlabs --token $(cat /root/.influxdb_token) --active

  1. Even with this config the connection will not work, because the CA is "self -signed" and not trusted
influx org list
 Error: failed to list orgs: Get "https://****:8086/api/v2/orgs": x509: certificate signed by unknown authority

AFAIK there is no parameter to allow the CA, but it helps to import it to the system store.
Maybe it helps to announce the full chain to InfluxDB.

Describe the Solution You Would Like

The module creates a CLI config and imports the puppet CA to the system store

Describe Alternatives You've Considered

Add this information to various readme files

@SimonHoenscheid SimonHoenscheid added the enhancement New feature or request label Feb 27, 2023
@henriklb
Copy link

Just encountered this issue recently. I would certainly appreciate this enhancement.

@henriklb
Copy link

To add to this: Setting use_ssl => false, still does not to create a influx config for the CLI.

The regular packaged install of influxdb2 does this, I believe.

@m0dular
Copy link
Contributor

m0dular commented Nov 27, 2023

Hi @henriklb and @SimonHoenscheid, I looked into this and it would be a good feature request to add to the module. However, we don't currently set up the cli as it comes from a different package than the influxdb2 one we use. We would need to add more resources for installing this package, setting up the config, etc.

That said, I think the --skip-verify flag is the only thing you need to work around this. I was able to make it work with that.

$ influx org list --skip-verify
ID                      Name
fe6b0c64bbbe9647        puppetlabs

@m0dular
Copy link
Contributor

m0dular commented Dec 5, 2023

@henriklb @SimonHoenscheid Does this option work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants