Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cc14129d
Commit
cc14129d
authored
Apr 27, 2021
by
Ben Prescott @bprescott_↙ ☺
Committed by
Achilleas Pipinellis
Apr 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parsing gitlab-shell.log with jq
parent
58c297f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
doc/administration/troubleshooting/log_parsing.md
doc/administration/troubleshooting/log_parsing.md
+39
-0
No files found.
doc/administration/troubleshooting/log_parsing.md
View file @
cc14129d
...
...
@@ -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
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment