sensu / sensu-influxdb-handler

Sensu Go InfluxDB Metrics Handler
https://sensu.io
MIT License
14 stars 16 forks source link

Don't unnecessarily require configuration vars #24

Closed flowerysong closed 5 years ago

flowerysong commented 5 years ago

InfluxDB connections do not always require a username and password, and we can default to connecting to the default port on localhost (matching the behaviour of the influx CLI tool.)

Fixes #23

portertech commented 5 years ago

Cool 👍 What happens when you provide a username OR password (not both)?

flowerysong commented 5 years ago

Cool +1 What happens when you provide a username OR password (not both)?

Depends on whether authentication is required.

If authentication is disabled on the server, any combination of credentials will be accepted and ignored.

If authentication is enabled, providing a password and no username is rejected: (error: {"error":"unable to parse authentication credentials"}), which is the same error returned when authentication is enabled but no credentials are provided. Providing a username and no password will either work (if the user has no password) or be rejected by the server (error: {"error":"authorization failed"})