Skip to content

Commit

Permalink
fix(flag): Valid default for auth-file (#110)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
bluecmd authored Jul 10, 2021
1 parent aa3ace3 commit 554bbef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion internal/config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit 554bbef

Please sign in to comment.