Skip to content

Commit

Permalink
ref: logging for different collection methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wbollock committed Oct 3, 2022
1 parent 18a0b24 commit 0ab358d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nagios_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,12 @@ func main() {
exporter := NewExporter(nagiosURL, conf.APIKey, *sslVerify, time.Duration(*nagiosAPITimeout)*time.Second, *statsBinary, *nagiosConfigPath)
prometheus.MustRegister(exporter)

log.Info("Using connection endpoint: ", *remoteAddress)
if *statsBinary == "" {
log.Info("Using connection endpoint: ", *remoteAddress)
} else {
log.Info("Using nagiostats binary: ", *statsBinary)
log.Info("Using Nagios configiration: ", *nagiosConfigPath)
}

http.Handle(*metricsPath, promhttp.Handler())
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit 0ab358d

Please sign in to comment.