aboutsummaryrefslogtreecommitdiff
path: root/haminer.go
diff options
context:
space:
mode:
Diffstat (limited to 'haminer.go')
-rw-r--r--haminer.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/haminer.go b/haminer.go
index 4864a97..10209d3 100644
--- a/haminer.go
+++ b/haminer.go
@@ -47,11 +47,15 @@ func NewHaminer(cfg *Config) (h *Haminer) {
}
func (h *Haminer) createForwarder() {
- if len(h.cfg.InfluxAPIWrite) > 0 {
- fwder := NewInfluxdbClient(h.cfg.InfluxAPIWrite)
-
- h.ff = append(h.ff, fwder)
+ if len(h.cfg.Influxd.Url) == 0 {
+ return
}
+
+ var (
+ fwder = NewInfluxdbClient(&h.cfg.Influxd)
+ )
+
+ h.ff = append(h.ff, fwder)
}
// Start will listen for UDP packet and start consuming log, parse, and