diff --git a/cmd/alltxt2http/main.go b/cmd/alltxt2http/main.go index 9da1ae7..bfc17dc 100644 --- a/cmd/alltxt2http/main.go +++ b/cmd/alltxt2http/main.go @@ -20,6 +20,7 @@ import ( // "github.com/tzneal/ham-go/dxcc" // "github.com/denzs/wsjtx-dashboards/shared/httpstuff" "github.com/hpcloud/tail" + "github.com/prometheus/client_golang/prometheus/promhttp" ) var alltxt string @@ -55,6 +56,13 @@ func init() { FullTimestamp: true, } log.SetFormatter(formatter) + + log.Info("prometheus exporter enabled..") + go func () { + server := http.NewServeMux() + server.Handle("/metrics", promhttp.Handler()) + http.ListenAndServe(":9123", server) + } () } func getTimestampFromDb() (int64, bool) {