From 4dcd2552d2f3fa71b6e15ea51aef5bbf9098b596 Mon Sep 17 00:00:00 2001 From: Robert Jacob Date: Thu, 9 Mar 2017 12:30:54 +0100 Subject: [PATCH] Assign a default port. --- README.md | 5 ++--- main.go | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a320370..7b472e7 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ This application tries to get data from the NetAtmo API. For that to work you wi ``` $ netatmo-exporter --help Usage of netatmo-exporter: - -a, --addr string Address to listen on. (default ":8080") + -a, --addr string Address to listen on. (default ":9210") -i, --client-id string Client ID for NetAtmo app. -s, --client-secret string Client secret for NetAtmo app. -p, --password string Password of NetAtmo account. @@ -37,7 +37,6 @@ scrape_configs: - job_name: 'netatmo' scrape_interval: 90s static_configs: - - targets: ['localhost:8080'] + - targets: ['localhost:9210'] ``` -**Note:** The exporter currently uses port 8080 as a default as it does not have an "assigned exporter port" yet. Look at the [prometheus Wiki](https://github.com/prometheus/prometheus/wiki/Default-port-allocations) for any updates. diff --git a/main.go b/main.go index 0b2b273..b069040 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,7 @@ type config struct { func parseConfig() (config, error) { cfg := config{} - pflag.StringVarP(&cfg.Addr, "addr", "a", ":8080", "Address to listen on.") + pflag.StringVarP(&cfg.Addr, "addr", "a", ":9210", "Address to listen on.") pflag.StringVarP(&cfg.Netatmo.ClientID, "client-id", "i", "", "Client ID for NetAtmo app.") pflag.StringVarP(&cfg.Netatmo.ClientSecret, "client-secret", "s", "", "Client secret for NetAtmo app.") pflag.StringVarP(&cfg.Netatmo.Username, "username", "u", "", "Username of NetAtmo account.")