This commit is contained in:
parent
cdeb27dad5
commit
20868b83a5
@ -5,8 +5,8 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/auth"
|
||||||
"github.com/alecthomas/kong"
|
"github.com/alecthomas/kong"
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/auth"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var cliStruct struct {
|
var cliStruct struct {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package cfg
|
package cfg
|
||||||
|
|
||||||
import "gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/auth"
|
import "git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/auth"
|
||||||
|
|
||||||
type AppSettings struct {
|
type AppSettings struct {
|
||||||
VersionMode bool
|
VersionMode bool
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/cfg"
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/socket"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/cfg"
|
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/socket"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Collector struct {
|
type Collector struct {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package f2b
|
package f2b
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/socket"
|
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/socket"
|
||||||
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package textfile
|
package textfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/cfg"
|
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/cfg"
|
||||||
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Collector struct {
|
type Collector struct {
|
||||||
|
@ -7,11 +7,11 @@ import (
|
|||||||
"os/signal"
|
"os/signal"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/cfg"
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/collector/f2b"
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/collector/textfile"
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/server"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/cfg"
|
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/collector/f2b"
|
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/collector/textfile"
|
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/server"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module gitlab.com/hectorjsmith/fail2ban-prometheus-exporter
|
module git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter
|
||||||
|
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/auth"
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
func AuthMiddleware(handlerFunc http.HandlerFunc, authProvider auth.AuthProvider) http.HandlerFunc {
|
func AuthMiddleware(handlerFunc http.HandlerFunc, authProvider auth.AuthProvider) http.HandlerFunc {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/collector/textfile"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/collector/textfile"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/cfg"
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/cfg"
|
||||||
"gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/collector/textfile"
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/collector/textfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
func StartServer(
|
func StartServer(
|
||||||
|
Loading…
Reference in New Issue
Block a user