|
|
@ -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) { |
|
|
|