Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-27 21:10:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-27 21:10:02 +0300
commitc3f28c9b07a4eb35fecd351e2d7b51212b6c2342 (patch)
treec7be0446307016ff7358a35b69eb3bb4f6a39d63 /doc/administration/troubleshooting/log_parsing.md
parenta2f36202361dcef1f2c9242929f81a4090b9ce97 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/administration/troubleshooting/log_parsing.md')
-rw-r--r--doc/administration/troubleshooting/log_parsing.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/administration/troubleshooting/log_parsing.md b/doc/administration/troubleshooting/log_parsing.md
index 2900ce58940..a0f71960e14 100644
--- a/doc/administration/troubleshooting/log_parsing.md
+++ b/doc/administration/troubleshooting/log_parsing.md
@@ -201,3 +201,42 @@ grep "fatal: " /var/log/gitlab/gitaly/current | \
jq '."grpc.request.glProjectPath"' | \
sort | uniq
```
+
+### Parsing `gitlab-shell.log`
+
+For investigating Git calls via SSH, from [GitLab 12.10](https://gitlab.com/gitlab-org/gitlab-shell/-/merge_requests/367).
+
+Find the top 20 calls by project and user:
+
+```shell
+jq --raw-output --slurp '
+ map(
+ select(
+ .username != null and
+ .gl_project_path !=null
+ )
+ )
+ | group_by(.username+.gl_project_path)
+ | sort_by(-length)
+ | limit(20; .[])
+ | "count: \(length)\tuser: \(.[0].username)\tproject: \(.[0].gl_project_path)" ' \
+ /var/log/gitlab/gitlab-shell/gitlab-shell.log
+```
+
+Find the top 20 calls by project, user, and command:
+
+```shell
+jq --raw-output --slurp '
+ map(
+ select(
+ .command != null and
+ .username != null and
+ .gl_project_path !=null
+ )
+ )
+ | group_by(.username+.gl_project_path+.command)
+ | sort_by(-length)
+ | limit(20; .[])
+ | "count: \(length)\tcommand: \(.[0].command)\tuser: \(.[0].username)\tproject: \(.[0].gl_project_path)" ' \
+ /var/log/gitlab/gitlab-shell/gitlab-shell.log
+```