From 554bbef671fb5e874f23831bbf6e86e0674c71df Mon Sep 17 00:00:00 2001 From: Christian Svensson Date: Sat, 10 Jul 2021 23:44:23 +0200 Subject: [PATCH] fix(flag): Valid default for auth-file (#110) * feat(flag): Valid default for auth-file Use the basename of the configuration file we use by default in the Docker image. * doc(readme): Update auth-file default value --- README.md | 2 +- internal/config/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 17cca39..f5b4b0e 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ To probe a FortiGate, do something like `curl 'localhost:9710/probe?target=https ### Available CLI parameters | flag | default value | description | |---|---|---| -| -auth-file | /config/fortigate-key.yaml | path to the location of the key file | +| -auth-file | fortigate-key.yaml | path to the location of the key file | | -listen | :9710 | address to listen for incoming requests | | -scrape-timeout | 30 | timeout in seconds | | -https-timeout | 10 | timeout in seconds for establishment of HTTPS connections | diff --git a/internal/config/main.go b/internal/config/main.go index 8f90420..5891199 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -43,7 +43,7 @@ type LocalCert struct { var ( parameter = FortiExporterParameter{ - AuthFile: flag.String("auth-file", "", "file containing the authentication map to use when connecting to a Fortigate device"), + AuthFile: flag.String("auth-file", "fortigate-key.yaml", "file containing the authentication map to use when connecting to a Fortigate device"), Listen: flag.String("listen", ":9710", "address to listen on"), ScrapeTimeout: flag.Int("scrape-timeout", 30, "max seconds to allow a scrape to take"), TLSTimeout: flag.Int("https-timeout", 10, "TLS Handshake timeout in seconds"),