add support for log events

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-05-12 18:34:59 +02:00
parent 43d011f125
commit 4eded56d5f
34 changed files with 856 additions and 139 deletions

View File

@@ -108,9 +108,9 @@ var (
Help: "The total number of login attempts",
})
// totalNoAuthTryed is te metric that reports the total number of clients disconnected
// totalNoAuthTried is te metric that reports the total number of clients disconnected
// for inactivity before trying to login
totalNoAuthTryed = promauto.NewCounter(prometheus.CounterOpts{
totalNoAuthTried = promauto.NewCounter(prometheus.CounterOpts{
Name: "sftpgo_no_auth_total",
Help: "The total number of clients disconnected for inactivity before trying to login",
})
@@ -984,10 +984,10 @@ func AddLoginResult(authMethod string, err error) {
}
}
// AddNoAuthTryed increments the metric for clients disconnected
// AddNoAuthTried increments the metric for clients disconnected
// for inactivity before trying to login
func AddNoAuthTryed() {
totalNoAuthTryed.Inc()
func AddNoAuthTried() {
totalNoAuthTried.Inc()
}
// HTTPRequestServed increments the metrics for HTTP requests

View File

@@ -64,9 +64,9 @@ func AddLoginAttempt(_ string) {}
// AddLoginResult increments the metrics for login results
func AddLoginResult(_ string, _ error) {}
// AddNoAuthTryed increments the metric for clients disconnected
// AddNoAuthTried increments the metric for clients disconnected
// for inactivity before trying to login
func AddNoAuthTryed() {}
func AddNoAuthTried() {}
// HTTPRequestServed increments the metrics for HTTP requests
func HTTPRequestServed(_ int) {}