Skip to content
Snippets Groups Projects
Commit 1306e0f0 authored by Anton Smith's avatar Anton Smith Committed by Justin Farmiloe
Browse files

Add checks for Gitaly and Gitaly Cluster

parent 3ba99fe1
No related branches found
No related tags found
1 merge request!155Add checks for Gitaly and Gitaly Cluster
......@@ -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 enabled
# Get quick commands and add specific service commands if available
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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment