Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
G
gitlabsos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.com
GitLab Support Team
toolbox
gitlabsos
Commits
1306e0f0
Commit
1306e0f0
authored
3 weeks ago
by
Anton Smith
Committed by
Justin Farmiloe
3 weeks ago
Browse files
Options
Downloads
Patches
Plain Diff
Add checks for Gitaly and Gitaly Cluster
parent
3ba99fe1
No related branches found
No related tags found
1 merge request
!155
Add checks for Gitaly and Gitaly Cluster
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gitlabsos.rb
+21
-2
21 additions, 2 deletions
gitlabsos.rb
with
21 additions
and
2 deletions
gitlabsos.rb
+
21
−
2
View file @
1306e0f0
...
...
@@ -261,6 +261,21 @@ module GitLabSOS
]
end
def
list_praefect_commands
[
{
cmd:
'gitlab-ctl praefect check'
,
result_path:
'praefect_check'
}
]
end
def
list_gitaly_commands
[
{
cmd:
'/opt/gitlab/embedded/bin/gitaly check /var/opt/gitlab/gitaly/config.toml'
,
result_path:
'gitaly_internal_api_check'
}
]
end
def
run_commands
logger
.
info
'Collecting diagnostics. This will probably take a few minutes..'
batch_size
=
4
...
...
@@ -275,9 +290,11 @@ module GitLabSOS
end
end
# Get quick commands and add
Patroni
commands if
en
able
d
# Get quick commands and add
specific service
commands if
avail
able
quick_commands
=
list_quick_commands
quick_commands
.
concat
(
list_patroni_commands
)
if
service_enabled?
(
'patroni'
)
quick_commands
.
concat
(
list_praefect_commands
)
if
service_enabled?
(
'praefect'
)
quick_commands
.
concat
(
list_gitaly_commands
)
if
service_enabled?
(
'gitaly'
)
# Run quick commands in batches
quick_commands
.
each_slice
(
batch_size
)
do
|
batch
|
...
...
@@ -317,7 +334,8 @@ module GitLabSOS
tasks
=
[
[
'db:migrate:status'
,
'gitlab_migrations'
],
[
'gitlab:elastic:info'
,
'elastic_info'
],
[
'gitlab:license:info'
,
'license_info'
]
[
'gitlab:license:info'
,
'license_info'
],
[
'gitlab:gitaly:check'
,
'gitaly_check'
]
]
tasks
.
concat
(
list_geo_commands
)
if
geo_node?
...
...
@@ -637,6 +655,7 @@ module GitLabSOS
services
<<
'prometheus'
if
service_enabled?
(
'prometheus'
)
services
<<
'psql'
if
service_enabled?
(
'postgresql'
)
services
<<
'patroni'
if
service_enabled?
(
'patroni'
)
services
<<
'praefect'
if
service_enabled?
(
'praefect'
)
services
<<
'puma'
if
service_enabled?
(
'puma'
)
services
<<
'redis'
if
service_enabled?
(
'redis'
)
services
<<
'registry'
if
service_enabled?
(
'registry'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment