aboutsummaryrefslogtreecommitdiff
path: root/cmd/moncheck
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/moncheck')
-rw-r--r--cmd/moncheck/main.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/moncheck/main.go b/cmd/moncheck/main.go
index b987186..73eee1a 100644
--- a/cmd/moncheck/main.go
+++ b/cmd/moncheck/main.go
@@ -16,7 +16,6 @@ import (
"time"
"git.zero-knowledge.org/gibheer/monzero"
- "github.com/lib/pq"
)
var (
@@ -71,13 +70,16 @@ func main() {
log.Fatalf("could not resolve hostname: %s", err)
}
- checker := monzero.NewChecker(monzero.CheckerConfig{
- CheckerID: cfg.CheckerID,
+ checker, err := monzero.NewChecker(monzero.CheckerConfig{
+ CheckerID: config.CheckerID,
DB: db,
Timeout: timeout,
HostIdentifier: hostname,
Executor: monzero.CheckExec,
})
+ if err != nil {
+ log.Fatalf("could not create checker instance: %s", err)
+ }
for i := 0; i < config.Workers; i++ {
go check(checker, waitDuration)