mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-27 15:16:35 +00:00
feat: Skip TLS verify in loading config from url
Signed-off-by: DiniFarb <andreas.vogt89@bluewin.ch>
This commit is contained in:
@@ -105,6 +105,10 @@ func main() {
|
||||
"config.file",
|
||||
"YAML configuration file to use. Values set in this file will be overridden by CLI flags.",
|
||||
).String()
|
||||
insecure_skip_verify = app.Flag(
|
||||
"config.file.insecure-skip-verify",
|
||||
"Skip TLS verification in loading YAML configuration.",
|
||||
).Default("false").Bool()
|
||||
webConfig = webflag.AddFlags(app, ":9182")
|
||||
metricsPath = app.Flag(
|
||||
"telemetry.path",
|
||||
@@ -152,7 +156,7 @@ func main() {
|
||||
|
||||
_ = level.Debug(logger).Log("msg", "Logging has Started")
|
||||
if *configFile != "" {
|
||||
resolver, err := config.NewResolver(*configFile, logger)
|
||||
resolver, err := config.NewResolver(*configFile, logger, *insecure_skip_verify)
|
||||
if err != nil {
|
||||
_ = level.Error(logger).Log("msg", "could not load config file", "err", err)
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user