summaryrefslogtreecommitdiff
path: root/internal/config/config_test.go
diff options
context:
space:
mode:
authorIgor Drozdov <idrozdov@gitlab.com>2022-04-07 22:19:09 +0400
committerIgor Drozdov <idrozdov@gitlab.com>2022-04-13 08:57:35 +0400
commitcc353a57f3aa8f3f751c175ea596d2baca0b1f19 (patch)
treebc89cbdc9ec3ca400305975e83363669fe639e69 /internal/config/config_test.go
parent9abd6d79043f90057ff9a7bf9deecb868e83c46d (diff)
downloadgitlab-shell-cc353a57f3aa8f3f751c175ea596d2baca0b1f19.tar.gz
Add additional metrics to gitlab-sshd
- Observe time to establish a session - Log the duration of the successfully established connection - Observe total time to handle the connection - Log the duration of the successfully executed connection - Observe the count of ssh connections - Observe the count of failed ssh connections
Diffstat (limited to 'internal/config/config_test.go')
-rw-r--r--internal/config/config_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index e422c4e..a929106 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -39,7 +39,7 @@ func TestCustomPrometheusMetrics(t *testing.T) {
require.NoError(t, err)
var actualNames []string
- for _, m := range ms[0:6] {
+ for _, m := range ms[0:9] {
actualNames = append(actualNames, m.GetName())
}
@@ -48,8 +48,11 @@ func TestCustomPrometheusMetrics(t *testing.T) {
"gitlab_shell_http_request_duration_seconds",
"gitlab_shell_http_requests_total",
"gitlab_shell_sshd_concurrent_limited_sessions_total",
- "gitlab_shell_sshd_connection_duration_seconds",
"gitlab_shell_sshd_in_flight_connections",
+ "gitlab_shell_sshd_session_duration_seconds",
+ "gitlab_shell_sshd_session_established_duration_seconds",
+ "gitlab_sli:shell_sshd_sessions:errors_total",
+ "gitlab_sli:shell_sshd_sessions:total",
}
require.Equal(t, expectedMetricNames, actualNames)