mirror of
https://github.com/steinhobelgruen/netatmo-exporter.git
synced 2024-11-22 01:13:56 +00:00
Assign a default port.
This commit is contained in:
parent
6d544cacda
commit
4dcd2552d2
|
@ -21,7 +21,7 @@ This application tries to get data from the NetAtmo API. For that to work you wi
|
||||||
```
|
```
|
||||||
$ netatmo-exporter --help
|
$ netatmo-exporter --help
|
||||||
Usage of netatmo-exporter:
|
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.
|
-i, --client-id string Client ID for NetAtmo app.
|
||||||
-s, --client-secret string Client secret for NetAtmo app.
|
-s, --client-secret string Client secret for NetAtmo app.
|
||||||
-p, --password string Password of NetAtmo account.
|
-p, --password string Password of NetAtmo account.
|
||||||
|
@ -37,7 +37,6 @@ scrape_configs:
|
||||||
- job_name: 'netatmo'
|
- job_name: 'netatmo'
|
||||||
scrape_interval: 90s
|
scrape_interval: 90s
|
||||||
static_configs:
|
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.
|
|
||||||
|
|
2
main.go
2
main.go
|
@ -17,7 +17,7 @@ type config struct {
|
||||||
|
|
||||||
func parseConfig() (config, error) {
|
func parseConfig() (config, error) {
|
||||||
cfg := config{}
|
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.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.ClientSecret, "client-secret", "s", "", "Client secret for NetAtmo app.")
|
||||||
pflag.StringVarP(&cfg.Netatmo.Username, "username", "u", "", "Username of NetAtmo account.")
|
pflag.StringVarP(&cfg.Netatmo.Username, "username", "u", "", "Username of NetAtmo account.")
|
||||||
|
|
Loading…
Reference in a new issue