From 6896ce69579ad334348c6e17c6ea9fa8895623c1 Mon Sep 17 00:00:00 2001 From: Denis Krivak Date: Sun, 3 Sep 2023 20:32:15 +0200 Subject: [PATCH] Change default port. --- Dockerfile | 1 + README.md | 4 ++-- config.example.yaml | 2 +- config.go | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6bc399a..119edb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,5 +20,6 @@ RUN apk add --no-cache ca-certificates && \ chown -R connectbox-exporter:connectbox-exporter . USER connectbox-exporter +EXPOSE 9119 ENTRYPOINT ["/app/connectbox-exporter"] diff --git a/README.md b/README.md index 6c62fe5..d7b18e3 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,10 @@ make build run Get exporter internal metrics ```sh -curl 'http://localhost:8080/metrics' +curl 'http://localhost:9119/metrics' ``` Get ConnectBox metrics ```sh -curl 'http://localhost:8080/probe?target=192.168.178.1' +curl 'http://localhost:9119/probe?target=192.168.178.1' ``` diff --git a/config.example.yaml b/config.example.yaml index b15d918..150cd81 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -1,4 +1,4 @@ -listen_addr: "0.0.0.0:8080" +listen_addr: "0.0.0.0:9119" targets: - addr: "192.168.178.1" username: "NULL" # actual default value used by ConnectBox diff --git a/config.go b/config.go index f12bf69..75a7cd3 100644 --- a/config.go +++ b/config.go @@ -33,7 +33,7 @@ func ReadConfig(file string) (Config, error) { // Set defaults if conf.ListenAddr == "" { - conf.ListenAddr = "0.0.0.0:8080" + conf.ListenAddr = "0.0.0.0:9119" } for i := range conf.Targets { if conf.Targets[i].Addr == "" {