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
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-09 18:08:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-09 18:08:59 +0300
commit6f2b1c32f3ccf422575f591b42372534502dcd72 (patch)
tree2ed532687d73e290f07c760825c02a2ecbaa5416 /doc
parentb90d8b54a4d623e52cf1d4318023e3b18d13dd5b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/administration/logs.md6
-rw-r--r--doc/administration/operations/rails_console.md20
-rw-r--r--doc/administration/troubleshooting/log_parsing.md14
-rw-r--r--doc/api/members.md21
-rw-r--r--doc/user/project/pages/index.md2
5 files changed, 60 insertions, 3 deletions
diff --git a/doc/administration/logs.md b/doc/administration/logs.md
index 8b6617210a4..1950403ce35 100644
--- a/doc/administration/logs.md
+++ b/doc/administration/logs.md
@@ -14,10 +14,12 @@ Find more about them [in Audit Events documentation](audit_events.md).
System log files are typically plain text in a standard log file format.
This guide talks about how to read and use these system log files.
-Read more about how to
-[customize logging on Omnibus GitLab installations](https://docs.gitlab.com/omnibus/settings/logs.html)
+Read more about the log system and using the logs:
+
+- [Customize logging on Omnibus GitLab installations](https://docs.gitlab.com/omnibus/settings/logs.html)
including adjusting log retention, log forwarding,
switching logs from JSON to plain text logging, and more.
+- [How to parse and analyze JSON logs](troubleshooting/log_parsing.md).
## `production_json.log`
diff --git a/doc/administration/operations/rails_console.md b/doc/administration/operations/rails_console.md
index b40560bf6e5..5add52e1a51 100644
--- a/doc/administration/operations/rails_console.md
+++ b/doc/administration/operations/rails_console.md
@@ -148,3 +148,23 @@ Traceback (most recent call last):
[traceback removed]
/opt/gitlab/..../runner_command.rb:42:in `load': cannot load such file -- /tmp/helloworld.rb (LoadError)
```
+
+In case you encouter a similar error to this:
+
+```plaintext
+[root ~]# sudo gitlab-rails runner helloworld.rb
+Please specify a valid ruby command or the path of a script to run.
+Run 'rails runner -h' for help.
+
+undefined local variable or method `helloworld' for main:Object
+```
+
+You can either move the file to the `/tmp` directory or create a new directory onwed by the user `git` and save the script in that directory as illustrated below:
+
+```shell
+sudo mkdir /scripts
+sudo mv /script_path/helloworld.rb /scripts
+sudo chown -R git:git /scripts
+sudo chmod 700 /scripts
+sudo gitlab-rails runner /scripts/helloworld.rb
+```
diff --git a/doc/administration/troubleshooting/log_parsing.md b/doc/administration/troubleshooting/log_parsing.md
index 25300d036ed..2900ce58940 100644
--- a/doc/administration/troubleshooting/log_parsing.md
+++ b/doc/administration/troubleshooting/log_parsing.md
@@ -41,6 +41,20 @@ jq -cR 'fromjson?' file.json | jq <COMMAND>
By default `jq` will error out when it encounters a line that is not valid JSON.
This skips over all invalid lines and parses the rest.
+#### Print a JSON log's time range
+
+```shell
+cat log.json | (head -1; tail -1) | jq '.time'
+```
+
+Use `zcat` if the file has been rotated and compressed:
+
+```shell
+zcat @400000006026b71d1a7af804.s | (head -1; tail -1) | jq '.time'
+
+zcat some_json.log.25.gz | (head -1; tail -1) | jq '.time'
+```
+
### Parsing `production_json.log` and `api_json.log`
#### Find all requests with a 5XX status code
diff --git a/doc/api/members.md b/doc/api/members.md
index 0948c82b05f..286be10dd6e 100644
--- a/doc/api/members.md
+++ b/doc/api/members.md
@@ -310,6 +310,27 @@ Example response:
]
```
+## Remove a billable member from a group
+
+Removes a billable member from a group and its subgroups and projects.
+
+The user does not need to be a group member to qualify for removal.
+For example, if the user was added directly to a project within the group, you can
+still use this API to remove them.
+
+```plaintext
+DELETE /groups/:id/billable_members/:user_id
+```
+
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
+| `user_id` | integer | yes | The user ID of the member |
+
+```shell
+curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/:id/billable_members/:user_id"
+```
+
## Add a member to a group or project
Adds a member to a group or project.
diff --git a/doc/user/project/pages/index.md b/doc/user/project/pages/index.md
index 1b04561c3c2..2a0e1207bf5 100644
--- a/doc/user/project/pages/index.md
+++ b/doc/user/project/pages/index.md
@@ -46,9 +46,9 @@ To create a GitLab Pages website:
| Document | Description |
| -------- | ----------- |
-| [Fork a sample project](getting_started/pages_forked_sample_project.md) | Create a new project with Pages already configured by forking a sample project. |
| [Use a new project template](getting_started/pages_new_project_template.md) | Create a new project with Pages already configured by using a new project template. |
| [Use a `.gitlab-ci.yml` template](getting_started/pages_ci_cd_template.md) | Add a Pages site to an existing project. Use a pre-populated CI template file. |
+| [Fork a sample project](getting_started/pages_forked_sample_project.md) | Create a new project with Pages already configured by forking a sample project. |
| [Create a `gitlab-ci.yml` file from scratch](getting_started/pages_from_scratch.md) | Add a Pages site to an existing project. Learn how to create and configure your own CI file. |
To update a GitLab Pages website: