Skip to content

Commit

Permalink
chore: add version infos at launch
Browse files Browse the repository at this point in the history
  • Loading branch information
lconsuegra committed Feb 29, 2024
1 parent 74feac2 commit d344286
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ipahealthcheck_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import (
)

var (
version = "development" // override by goreleaser
commit = "none" // override by goreleaser
date = "none" // override by goreleaser

metricsPath string
ipahealthcheckPath string
ipahealthcheckLogPath string
Expand Down Expand Up @@ -272,6 +276,12 @@ func main() {
}
})

if date == "none" {
date = time.Now().String()
}

log.Infof("Running exporter version %s, commit %s, built at %s", version, commit, date)

log.Infof("ipa-healthcheck exporter listening on http://%v:%d\n", address, port)

if err := http.ListenAndServe(fmt.Sprintf("%v:%d", address, port), nil); err != nil {
Expand Down

0 comments on commit d344286

Please sign in to comment.