Skip to content

Commit

Permalink
Add log.message
Browse files Browse the repository at this point in the history
The field `log.message` contains the full log message before splitting it up in multiple parts.

In contrast to the `message` field which can contain an extracted part of the log message, this field contains the original, full log message. It can have already some modifications applied like encoding or new lines removed to clean up the log message.

This field is not indexed and doc_values are disabled so it can't be
queried but the value can be retrieved from `_source`.
  • Loading branch information
ruflin committed Jun 11, 2018
1 parent b87c730 commit 2a67f26
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ All notable changes to this project will be documented in this file based on the
* Adds cloud.account.id for top level organizational level. #11
* Add `http.response.status_code` and `http.response.body` fields. #4
* Add fields for Operating System data. #5
* Add `log.message`. #3

### Deprecated
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ Fields which are specific to log events.
| <a name="log.level"></a>`log.level` | Log level of the log event.<br/>Some examples are `WARN`, `ERR`, `INFO`. | keyword | | `ERR` |
| <a name="log.line"></a>`log.line` | Line number the log event was collected from. | long | | `18` |
| <a name="log.offset"></a>`log.offset` | Offset of the beginning of the log event. | long | | `12` |
| <a name="log.message"></a>`log.message` | This is the log message and contains the full log message before splitting it up in multiple parts.<br/>In contrast to the `message` field which can contain an extracted part of the log message, this field contains the original, full log message. It can have already some modifications applied like encoding or new lines removed to clean up the log message.<br/>This field is not indexed and doc_values are disabled so it can't be queried but the value can be retrieved from `_source`. | keyword | | `Sep 19 08:26:10 localhost My log` |


## <a name="network"></a> Network fields
Expand Down
1 change: 1 addition & 0 deletions schema.csv
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ kubernetes.namespace,keyword,0,
kubernetes.pod.name,keyword,0,
log.level,keyword,0,ERR
log.line,long,0,18
log.message,keyword,1,Sep 19 08:26:10 localhost My log
log.offset,long,0,12
network.direction,keyword,0,inbound
network.forwarded_ip,ip,0,192.1.1.2
Expand Down
17 changes: 17 additions & 0 deletions schemas/log.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,20 @@
description: >
Offset of the beginning of the log event.
example: 12
- name: message
type: keyword
phase: 1
example: "Sep 19 08:26:10 localhost My log"
index: false
doc_values: false
description: >
This is the log message and contains the full log message before
splitting it up in multiple parts.
In contrast to the `message` field which can contain an extracted part
of the log message, this field contains the original, full log message.
It can have already some modifications applied like encoding or new
lines removed to clean up the log message.
This field is not indexed and doc_values are disabled so it can't be
queried but the value can be retrieved from `_source`.
6 changes: 6 additions & 0 deletions template.json
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,12 @@
"line": {
"type": "long"
},
"message": {
"doc_values": false,
"ignore_above": 1024,
"index": false,
"type": "keyword"
},
"offset": {
"type": "long"
}
Expand Down

0 comments on commit 2a67f26

Please sign in to comment.