Include the version in the initial log output

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
2023-07-30 13:51:16 +01:00
parent bfe1115cb5
commit 15625050c7
3 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"
)
var Version = "dev"
var addr string
func init() {
@@ -32,7 +33,7 @@ func main() {
metrics.Collect(client, reg)
http.Handle("/metrics", promhttp.HandlerFor(reg, promhttp.HandlerOpts{Registry: reg}))
log.Printf("tailscale-exporter")
log.Printf("tailscale-exporter - %s", Version)
log.Printf("Listening on %s", addr)
log.Fatal(http.ListenAndServe(addr, nil))
}