diff --git a/src/exporter.go b/src/exporter.go index 2468ea0..8adc057 100644 --- a/src/exporter.go +++ b/src/exporter.go @@ -3,12 +3,11 @@ package main import ( "fail2ban-prometheus-exporter/cfg" "fail2ban-prometheus-exporter/collector/f2b" - textfile2 "fail2ban-prometheus-exporter/collector/textfile" + "fail2ban-prometheus-exporter/collector/textfile" "fmt" "log" "net/http" - _ "github.com/mattn/go-sqlite3" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" ) @@ -44,7 +43,7 @@ func rootHtmlHandler(w http.ResponseWriter, r *http.Request) { } } -func metricHandler(w http.ResponseWriter, r *http.Request, collector *textfile2.Collector) { +func metricHandler(w http.ResponseWriter, r *http.Request, collector *textfile.Collector) { promhttp.Handler().ServeHTTP(w, r) collector.WriteTextFileMetrics(w, r) } @@ -61,7 +60,7 @@ func main() { f2bCollector := f2b.NewExporter(appSettings, version) prometheus.MustRegister(f2bCollector) - textFileCollector := textfile2.NewCollector(appSettings) + textFileCollector := textfile.NewCollector(appSettings) prometheus.MustRegister(textFileCollector) http.HandleFunc("/", rootHtmlHandler) diff --git a/src/go.mod b/src/go.mod index 1e47f44..31db45f 100644 --- a/src/go.mod +++ b/src/go.mod @@ -4,7 +4,6 @@ go 1.15 require ( github.com/kisielk/og-rek v1.1.0 - github.com/mattn/go-sqlite3 v1.14.6 github.com/nlpodyssey/gopickle v0.1.0 github.com/prometheus/client_golang v1.9.0 ) diff --git a/src/go.sum b/src/go.sum index 8f79c52..3200d34 100644 --- a/src/go.sum +++ b/src/go.sum @@ -152,8 +152,6 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=