forked from elastic/stack-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Add ECS fields to Logs monitoring guide (elastic#1203)
* Add ECS fields * Fix indentation * Update fields list * Update following review
- Loading branch information
EamonnTP
authored and
Eamonn Smith
committed
Jun 29, 2020
1 parent
20473bf
commit b1c4246
Showing
3 changed files
with
160 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
[[logs-fields-reference]] | ||
[chapter, role="xpack"] | ||
= Logs fields reference | ||
|
||
This section lists the required fields the {logs-app} uses to display data. | ||
Some of the fields listed are https://www.elastic.co/guide/en/ecs/current/ecs-reference.html#_what_is_ecs[ECS fields]. | ||
|
||
IMPORTANT: Beat modules (for example, {filebeat-ref}/filebeat-modules.html[{filebeat} modules]) | ||
are ECS-compliant so manual field mapping is not required, and all {logs-app} | ||
data is automatically populated. If you cannot use {beats}, map your data to | ||
{ecs-ref}[ECS fields] (see {ecs-ref}/ecs-converting.html[how to map data to ECS]). | ||
You can also try using the experimental https://github.com/elastic/ecs-mapper[ECS Mapper] tool. | ||
|
||
`@timestamp`:: | ||
|
||
Date/time when the event originated. | ||
+ | ||
This is the date/time extracted from the event, typically representing when the event was generated by the source. | ||
If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline. | ||
Required field for all events. | ||
+ | ||
type: date | ||
+ | ||
required: True | ||
+ | ||
ECS field: True | ||
+ | ||
example: `May 27, 2020 @ 15:22:27.982` | ||
|
||
|
||
`_doc`:: | ||
|
||
This field is used to break ties between two entries with the same timestamp. | ||
+ | ||
required: True | ||
+ | ||
ECS field: False | ||
|
||
|
||
`container.id`:: | ||
|
||
Unique container id. | ||
+ | ||
type: keyword | ||
+ | ||
required: True | ||
+ | ||
ECS field: True | ||
+ | ||
example: `data` | ||
|
||
|
||
`event.dataset`:: | ||
|
||
Name of the dataset. | ||
+ | ||
If an event source publishes more than one type of log or events (e.g. access log, error log), the dataset is used to specify which one the event comes from. | ||
+ | ||
It’s recommended but not required to start the dataset name with the module name, followed by a dot, then the dataset name. | ||
+ | ||
type: keyword | ||
+ | ||
required: True, if you want to use the {ml-features}. | ||
+ | ||
ECS field: True | ||
+ | ||
example: `apache.access` | ||
|
||
|
||
`host.hostname`:: | ||
|
||
Hostname of the host. | ||
+ | ||
It normally contains what the `hostname` command returns on the host machine. | ||
+ | ||
type: keyword | ||
+ | ||
required: True, if you want to enable and use the *View in Context* feature. | ||
+ | ||
ECS field: True | ||
+ | ||
example: `Elastic.local` | ||
|
||
|
||
`host.name`:: | ||
|
||
Name of the host. | ||
+ | ||
It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use. | ||
+ | ||
type: keyword | ||
+ | ||
required: True | ||
+ | ||
ECS field: True | ||
+ | ||
example: `MacBook-Elastic.local` | ||
|
||
|
||
`kubernetes.pod.uid`:: | ||
|
||
Kubernetes Pod UID. | ||
+ | ||
type: keyword | ||
+ | ||
required: True | ||
+ | ||
ECS field: False | ||
+ | ||
example: `8454328b-673d-11ea-7d80-21010a840123` | ||
|
||
|
||
`log.file.path`:: | ||
|
||
Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. | ||
+ | ||
If the event wasn't read from a log file, do not populate this field. | ||
+ | ||
type: keyword | ||
+ | ||
required: True, if you want to use the *View in Context* feature. | ||
+ | ||
ECS field: False | ||
+ | ||
example: `/var/log/demo.log` | ||
|
||
|
||
`message`:: | ||
|
||
For log events the message field contains the log message, optimized for viewing in a log viewer. | ||
+ | ||
For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. | ||
+ | ||
If multiple messages exist, they can be combined into one message. | ||
+ | ||
type: text | ||
+ | ||
required: True | ||
+ | ||
ECS field: True | ||
+ | ||
example: `Hello World` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters