From ea640dfb6d6d1fec665767713c32fa7fc7afde64 Mon Sep 17 00:00:00 2001 From: blotus Date: Thu, 2 Sep 2021 12:35:12 +0200 Subject: [PATCH] fix datasource prometheus metrics not being registered (#927) --- cmd/crowdsec/crowdsec.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/crowdsec/crowdsec.go b/cmd/crowdsec/crowdsec.go index c80977964..d5ab81133 100644 --- a/cmd/crowdsec/crowdsec.go +++ b/cmd/crowdsec/crowdsec.go @@ -108,12 +108,6 @@ func runCrowdsec(cConfig *csconfig.Config, parsers *parser.Parsers) error { return nil }) outputWg.Wait() - log.Warningf("Starting processing data") - - if err := acquisition.StartAcquisition(dataSources, inputLineChan, &acquisTomb); err != nil { - log.Fatalf("starting acquisition error : %s", err) - return err - } if cConfig.Prometheus != nil && cConfig.Prometheus.Enabled { aggregated := false @@ -125,6 +119,12 @@ func runCrowdsec(cConfig *csconfig.Config, parsers *parser.Parsers) error { } } + log.Warningf("Starting processing data") + + if err := acquisition.StartAcquisition(dataSources, inputLineChan, &acquisTomb); err != nil { + log.Fatalf("starting acquisition error : %s", err) + return err + } return nil }