mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
add support for log events
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
Reference in New Issue
Block a user