Skip to content

Commit

Permalink
Update defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
MacroPower committed Jul 30, 2020
1 parent 8b5a706 commit d2c50ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ usage: wakatime_exporter --wakatime.api-key=WAKATIME.API-KEY [<flags>]
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
--web.listen-address=":9101"
--web.listen-address=":9212"
Address to listen on for web interface and telemetry.
--web.telemetry-path="/metrics"
Path under which to expose metrics.
--wakatime.scrape-uri="https://wakatime.com/api/v1/users/current"
Path to query for data.
Base path to query for Wakatime data.
--wakatime.api-key=WAKATIME.API-KEY
Token for trying to get stats from wakatime.
--wakatime.timeout=5s Timeout for trying to get stats from wakatime.
Token to use when getting stats from Wakatime.
--wakatime.timeout=5s Timeout for trying to get stats from Wakatime.
--wakatime.ssl-verify Flag that enables SSL certificate verification for the scrape URI
--log.level=info Only log messages with the given severity or above. One of: [debug, info, warn, error]
--log.level=info Only log messages with the given severity or above.
One of: [debug, info, warn, error]
--log.format=logfmt Output format of log messages. One of: [logfmt, json]
--version Show application version.
```
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ func NewExporter(uri string, token string, sslVerify bool, timeout time.Duration

func main() {
var (
listenAddress = kingpin.Flag("web.listen-address", "Address to listen on for web interface and telemetry.").Default(":9101").String()
listenAddress = kingpin.Flag("web.listen-address", "Address to listen on for web interface and telemetry.").Default(":9212").String()
metricsPath = kingpin.Flag("web.telemetry-path", "Path under which to expose metrics.").Default("/metrics").String()
wakaScrapeURI = kingpin.Flag("wakatime.scrape-uri", "Path to query for data.").Default("https://wakatime.com/api/v1/users/current").String()
wakaToken = kingpin.Flag("wakatime.api-key", "Token for trying to get stats from wakatime.").Required().String()
wakaTimeout = kingpin.Flag("wakatime.timeout", "Timeout for trying to get stats from wakatime.").Default("5s").Duration()
wakaScrapeURI = kingpin.Flag("wakatime.scrape-uri", "Base path to query for Wakatime data.").Default("https://wakatime.com/api/v1/users/current").String()
wakaToken = kingpin.Flag("wakatime.api-key", "Token to use when getting stats from Wakatime.").Required().String()
wakaTimeout = kingpin.Flag("wakatime.timeout", "Timeout for trying to get stats from Wakatime.").Default("5s").Duration()
wakaSSLVerify = kingpin.Flag("wakatime.ssl-verify", "Flag that enables SSL certificate verification for the scrape URI").Default("true").Bool()
)

Expand Down

0 comments on commit d2c50ee

Please sign in to comment.