diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-03 12:09:39 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-03 12:09:39 +0000 |
commit | f145ef4be75f3711c52a680b86d96568e9acf385 (patch) | |
tree | 5e90358a166062305cf41f73e541cf4744b76c4d /doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md | |
parent | 544eaa90817fa8595826fbd44f37452c76b56378 (diff) | |
download | gitlab-ce-CSTarun.tar.gz |
Add latest changes from gitlab-org/gitlab@masterCSTarun
Diffstat (limited to 'doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md')
-rw-r--r-- | doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md index 29dd23db90b..8bdb5a7176d 100644 --- a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md +++ b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md @@ -1015,3 +1015,39 @@ This will also refresh the cached usage ping displayed in the admin area ```ruby Gitlab::UsageData.to_json(force_refresh: true) ``` + +## Elasticsearch + +### Configuration attributes + +Open the rails console (`gitlab rails c`) and run the following command to see all the available attributes: + +```ruby +ApplicationSetting.last.attributes +``` + +Among other attributes, in the output you will notice that all the settings available in the [Elasticsearch Integration page](../../integration/elasticsearch.md), like: `elasticsearch_indexing`, `elasticsearch_url`, `elasticsearch_replicas`, `elasticsearch_pause_indexing`, etc. + +#### Setting attributes + +You can then set anyone of Elasticsearch integration settings by issuing a command similar to: + +```ruby +ApplicationSetting.last.update_attributes(elasticsearch_url: '<your ES URL and port>') + +#or + +ApplicationSetting.last.update_attributes(elasticsearch_indexing: false) +``` + +#### Getting attributes + +You can then check if the settings have been set in the [Elasticsearch Integration page](../../integration/elasticsearch.md) or in the rails console by issuing: + +```ruby +Gitlab::CurrentSettings.elasticsearch_url + +#or + +Gitlab::CurrentSettings.elasticsearch_indexing +``` |