Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add log.message #3

Merged
merged 1 commit into from
Jun 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For logs, ignore_above: 1024 will be too small.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the docs for this and run some tests: https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-above.html

It seems like ignore_above does not play any role here as it's not index anyway. _source is not affected by ignore_above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. Thanks for testing.

Maybe we shouldn't even set an ignore_above when index: false? I imagine others having a similar reaction to mine.

"index": false,
"type": "keyword"
},
"offset": {
"type": "long"
}
Expand Down