Open wally007 opened 8 months ago
Please check pre-relaese 0.3.7
Give some feedbacks so that if it is ok for you, I can merge this fix to master branch.
Doc: Extract from README
Most of the time the access to a http api requires an authentication. It is the case for the 3 contribs (hp3par, veeam, netscaler). The exporter allows you 2 modes:
The auth parameters are :
The user, password and token values can be raw strings or retrive the values from environment variables. To use env var the value must be prefixed by "$env:" followed by the name of the variable.
# use this auth_config to authenticate via env vars
default:
mode: script
user: $env:VEEAM_EXPORTER_USER
password: $env:VEEAM_EXPORTER_PASSWD
thank you
i haven't tried this GO exporter yet.
I was able add environment variables to the python version and it works great. Im more comfortable with python.
Once I get my head wrapped around GO, this httpapi exporter and how it works, I'd like to try it to fetch HPe Oneview stats and see if it work with their API as well.
As discussed in python version of the Veeam exporter... " The new configuration's model allows to defined authentication model (user/passwd/attrs) identified by name; this model maybe should use user/passwd values set by env. " ... could you please enhance this GO version so that at least some parameters (such as username/password/target) can be supplied (and take precedence if they are set) via environment variables ?