summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-10-18 12:50:21 -0700
committerStan Hu <stanhu@gmail.com>2018-10-18 15:59:12 -0700
commit143d0e26664e85be9382d1b1f8e99ead96e5d642 (patch)
tree304f621e9a8fc1fc12849212cd59a1d7b79f2456 /doc
parent5edf87d0ac699575421ec96cbc0fc91ea0c3c078 (diff)
downloadgitlab-ce-143d0e26664e85be9382d1b1f8e99ead96e5d642.tar.gz
Add support for JSON logging for audit events
This will add audit_json.log that writes one line per audit event. For example: { "severity":"INFO", "time":"2018-10-17T17:38:22.523Z", "author_id":3, "entity_id":2, "entity_type":"Project", "change":"visibility", "from":"Private", "to":"Public", "author_name":"John Doe4", "target_id":2, "target_type":"Project", "target_details":"namespace2/project2" }
Diffstat (limited to 'doc')
-rw-r--r--doc/administration/logs.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/administration/logs.md b/doc/administration/logs.md
index a8cdd20581d..0e41a38b7e2 100644
--- a/doc/administration/logs.md
+++ b/doc/administration/logs.md
@@ -144,6 +144,20 @@ December 03, 2014 13:20 -> ERROR -> Command failed [1]: /usr/bin/git --git-dir=/
error: failed to push some refs to '/Users/vsizov/gitlab-development-kit/repositories/gitlabhq/gitlab_git.git'
```
+## `audit_json.log`
+
+This file lives in `/var/log/gitlab/gitlab-rails/audit_json.log` for
+Omnibus GitLab packages or in `/home/git/gitlab/log/audit_json.log` for
+installations from source.
+
+Changes to group or project settings are logged to this file. For example:
+
+```json
+{"severity":"INFO","time":"2018-10-17T17:38:22.523Z","author_id":3,"entity_id":2,"entity_type":"Project","change":"visibility","from":"Private","to":"Public","author_name":"John Doe4","target_id":2,"target_type":"Project","target_details":"namespace2/project2"}
+{"severity":"INFO","time":"2018-10-17T17:38:22.830Z","author_id":5,"entity_id":3,"entity_type":"Project","change":"name","from":"John Doe7 / project3","to":"John Doe7 / new name","author_name":"John Doe6","target_id":3,"target_type":"Project","target_details":"namespace3/project3"}
+{"severity":"INFO","time":"2018-10-17T17:38:23.175Z","author_id":7,"entity_id":4,"entity_type":"Project","change":"path","from":"","to":"namespace4/newpath","author_name":"John Doe8","target_id":4,"target_type":"Project","target_details":"namespace4/newpath"}
+```
+
## `sidekiq.log`
This file lives in `/var/log/gitlab/gitlab-rails/sidekiq.log` for