Closed 4xoc closed 1 year ago
There has been in the past a discussion on this topic and it was expressly required by the Prometheus maintainers to remove the authentication token from the get parameters, so we have to reject this PR. We will instead implement a different option, that consists of a simple configuration containing the flasharray/api-token as a list of key/value pairs.
This PR reintroduces behavior from an older exporter where API keys can be supplied as GET parameter. Doing so allows using a single scrape config for multiple arrays that all use different API keys which in turn simplifies alerting rules (because job_name is identical). It removes the requirement to have one scrape config per target configured as is the case today.
WARNING using this feature will result in API keys being visible in the target list in Prometheus. Use with read-only keys only and be be aware of the security implications. This function only works when the exporter is started using a new flag
-secret_parameter
to enable this functionality only on purpose.Example Prometheus config
Example file_sd contents: