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:
authorStan Hu <stanhu@gmail.com>2018-11-27 19:51:34 +0300
committerStan Hu <stanhu@gmail.com>2018-11-27 19:51:34 +0300
commit681d7139a995a8d2e299c567d45c03221f89fd6f (patch)
tree2dda494cdd5d9ac0d24ea9325dadd956e16db0db /doc
parent17acf40dc98f05a476176dbd0b5da813be39b909 (diff)
parent7e7fb6deba4e58b4dbbb21a8e859327cebd109d1 (diff)
Merge branch 'json-logging-for-k8s' into 'master'
Json logging for k8s Integration See merge request gitlab-org/gitlab-ce!23328
Diffstat (limited to 'doc')
-rw-r--r--doc/administration/logs.md19
-rw-r--r--doc/development/logging.md10
2 files changed, 24 insertions, 5 deletions
diff --git a/doc/administration/logs.md b/doc/administration/logs.md
index 7e5a3eb9ccd..698f4caab3a 100644
--- a/doc/administration/logs.md
+++ b/doc/administration/logs.md
@@ -126,6 +126,25 @@ It contains information about [integrations](../user/project/integrations/projec
{"severity":"INFO","time":"2018-09-06T17:15:16.365Z","service_class":"JiraService","project_id":3,"project_path":"namespace2/project2","message":"Successfully posted","client_url":"http://jira.example.net"}
```
+## `kubernetes.log`
+
+Introduced in GitLab 11.6. This file lives in
+`/var/log/gitlab/gitlab-rails/kubernetes.log` for Omnibus GitLab
+packages or in `/home/git/gitlab/log/kubernetes.log` for
+installations from source.
+
+It logs information related to the Kubernetes Integration including errors
+during installing cluster applications on your GitLab managed Kubernetes
+clusters.
+
+Each line contains a JSON line that can be ingested by Elasticsearch, Splunk,
+etc. For example:
+
+```json
+{"severity":"ERROR","time":"2018-11-23T15:14:54.652Z","exception":"Kubeclient::HttpError","error_code":401,"service":"Clusters::Applications::CheckInstallationProgressService","app_id":14,"project_ids":[1],"group_ids":[],"message":"Unauthorized"}
+{"severity":"ERROR","time":"2018-11-23T15:42:11.647Z","exception":"Kubeclient::HttpError","error_code":null,"service":"Clusters::Applications::InstallService","app_id":2,"project_ids":[19],"group_ids":[],"message":"SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)"}
+```
+
## `githost.log`
This file lives in `/var/log/gitlab/gitlab-rails/githost.log` for
diff --git a/doc/development/logging.md b/doc/development/logging.md
index abd08c420da..5c1d96b9e0c 100644
--- a/doc/development/logging.md
+++ b/doc/development/logging.md
@@ -75,7 +75,7 @@ To create a new file:
module Import
class Logger < ::Gitlab::JsonLogger
def self.file_name_noext
- 'importer_json'
+ 'importer'
end
end
end
@@ -105,7 +105,7 @@ To create a new file:
```ruby
# GOOD
- logger.info("Unable to create project", project_id: project.id)
+ logger.info(message: "Unable to create project", project_id: project.id)
```
1. Be sure to create a common base structure of your log messages. For example,
@@ -118,13 +118,13 @@ To create a new file:
```ruby
# BAD
- logger.info("Import error", error: 1)
- logger.info("Import error", error: "I/O failure")
+ logger.info(message: "Import error", error: 1)
+ logger.info(message: "Import error", error: "I/O failure")
```
```ruby
# GOOD
- logger.info("Import error", error_code: 1, error: "I/O failure")
+ logger.info(message: "Import error", error_code: 1, error: "I/O failure")
```
## Additional steps with new log files