|
7 | 7 | )
|
8 | 8 |
|
9 | 9 | type sshServerMetrics struct {
|
10 |
| - connectionFailedCallback prometheus.Counter |
| 10 | + failedConnectionsTotal prometheus.Counter |
11 | 11 |
|
12 | 12 | // SFTP
|
13 | 13 | sftpHandler prometheus.Counter
|
@@ -47,10 +47,10 @@ type sessionMetricsObject struct {
|
47 | 47 | type sessionMetrics map[string]sessionMetricsObject
|
48 | 48 |
|
49 | 49 | func newSSHServerMetrics(registerer prometheus.Registerer) *sshServerMetrics {
|
50 |
| - connectionFailedCallback := prometheus.NewCounter(prometheus.CounterOpts{ |
51 |
| - Namespace: "agent", Subsystem: "ssh_server", Name: "connection_failed_callback", |
| 50 | + failedConnectionsTotal := prometheus.NewCounter(prometheus.CounterOpts{ |
| 51 | + Namespace: "agent", Subsystem: "ssh_server", Name: "failed_connections_total", |
52 | 52 | })
|
53 |
| - registerer.MustRegister(connectionFailedCallback) |
| 53 | + registerer.MustRegister(failedConnectionsTotal) |
54 | 54 |
|
55 | 55 | sftpHandler := prometheus.NewCounter(prometheus.CounterOpts{
|
56 | 56 | Namespace: "agent", Subsystem: "ssh_server", Name: "sftp_handler",
|
@@ -80,12 +80,12 @@ func newSSHServerMetrics(registerer prometheus.Registerer) *sshServerMetrics {
|
80 | 80 | sessions := newSessionMetrics(registerer)
|
81 | 81 |
|
82 | 82 | return &sshServerMetrics{
|
83 |
| - connectionFailedCallback: connectionFailedCallback, |
84 |
| - sftpHandler: sftpHandler, |
85 |
| - sftpServerError: sftpServerError, |
86 |
| - x11HostnameError: x11HostnameError, |
87 |
| - x11SocketDirError: x11SocketDirError, |
88 |
| - x11XauthorityError: x11XauthorityError, |
| 83 | + failedConnectionsTotal: failedConnectionsTotal, |
| 84 | + sftpHandler: sftpHandler, |
| 85 | + sftpServerError: sftpServerError, |
| 86 | + x11HostnameError: x11HostnameError, |
| 87 | + x11SocketDirError: x11SocketDirError, |
| 88 | + x11XauthorityError: x11XauthorityError, |
89 | 89 |
|
90 | 90 | sessions: sessions,
|
91 | 91 | }
|
|
0 commit comments