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>2022-09-19 15:13:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-19 15:13:05 +0300
commit7de8ed230af7b166e7cc65b3b9351694fadb7d48 (patch)
tree3ca149b952bc4c2c2c6828f1814e323574b3f886 /doc/integration/advanced_search
parentbffc536bf828828a4c05c4e3cbffef83c781448a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/integration/advanced_search')
-rw-r--r--doc/integration/advanced_search/elasticsearch_troubleshooting.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/doc/integration/advanced_search/elasticsearch_troubleshooting.md b/doc/integration/advanced_search/elasticsearch_troubleshooting.md
index 7fa297cda15..e1a566541c2 100644
--- a/doc/integration/advanced_search/elasticsearch_troubleshooting.md
+++ b/doc/integration/advanced_search/elasticsearch_troubleshooting.md
@@ -9,6 +9,64 @@ info: To determine the technical writer assigned to the Stage/Group associated w
Use the following information to troubleshoot Elasticsearch issues.
+## Set configurations in the Rails console
+
+See [Starting a Rails console session](../../administration/operations/rails_console.md#starting-a-rails-console-session).
+
+### List attributes
+
+To list all available attributes:
+
+1. Open the Rails console (`gitlab rails c`).
+1. Run the following command:
+
+```ruby
+ApplicationSetting.last.attributes
+```
+
+The output contains all the settings available in [Elasticsearch integration](../../integration/advanced_search/elasticsearch.md), such as `elasticsearch_indexing`, `elasticsearch_url`, `elasticsearch_replicas`, and `elasticsearch_pause_indexing`.
+
+### Set attributes
+
+To set an Elasticsearch integration setting, run a command like:
+
+```ruby
+ApplicationSetting.last.update(elasticsearch_url: '<your ES URL and port>')
+
+#or
+
+ApplicationSetting.last.update(elasticsearch_indexing: false)
+```
+
+### Get attributes
+
+To check if the settings have been set in [Elasticsearch integration](../../integration/advanced_search/elasticsearch.md) or in the Rails console, run a command like:
+
+```ruby
+Gitlab::CurrentSettings.elasticsearch_url
+
+#or
+
+Gitlab::CurrentSettings.elasticsearch_indexing
+```
+
+### Change the password
+
+To change the Elasticsearch password, run the following commands:
+
+```ruby
+es_url = Gitlab::CurrentSettings.current_application_settings
+
+# Confirm the current Elasticsearch URL
+es_url.elasticsearch_url
+
+# Set the Elasticsearch URL
+es_url.elasticsearch_url = "http://<username>:<password>@your.es.host:<port>"
+
+# Save the change
+es_url.save!
+```
+
## View logs
One of the most valuable tools for identifying issues with the Elasticsearch