Skip to content

Commit e7f66e2

Browse files
Add additional log.syslog fields (#1793)
- Add additional fields for RFC 5424 messages (log.syslog.version, log.syslog.msgid, log.syslog.data) - Add log.syslog.hostname, log.syslog.appname, and log.syslog.procid for hostname, process name, and process ID fields present in syslog messages, respectively. These fields are added since it is not always known that user wants these values copied to the more general ECS fields (host.hostname, process.name, process.pid). - Updating changelog entry to 8.2 Co-authored-by: Kylie Geller <[email protected]>
1 parent ccce725 commit e7f66e2

File tree

15 files changed

+640
-0
lines changed

15 files changed

+640
-0
lines changed

CHANGELOG.next.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Thanks, you're awesome :-) -->
4747
#### Added
4848

4949
* Add beta `container.*` metric fields. #1789
50+
* Add six new syslog fields to `log.syslog.*`. #1793
5051

5152
#### Improvements
5253

docs/fields/field-details.asciidoc

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5411,6 +5411,22 @@ type: object
54115411

54125412

54135413

5414+
| extended
5415+
5416+
// ===============================================================
5417+
5418+
|
5419+
[[field-log-syslog-appname]]
5420+
<<field-log-syslog-appname, log.syslog.appname>>
5421+
5422+
| The device or application that originated the Syslog message, if available.
5423+
5424+
type: keyword
5425+
5426+
5427+
5428+
example: `sshd`
5429+
54145430
| extended
54155431

54165432
// ===============================================================
@@ -5449,6 +5465,38 @@ example: `local7`
54495465

54505466
// ===============================================================
54515467

5468+
|
5469+
[[field-log-syslog-hostname]]
5470+
<<field-log-syslog-hostname, log.syslog.hostname>>
5471+
5472+
| The hostname, FQDN, or IP of the machine that originally sent the Syslog message. This is sourced from the hostname field of the syslog header. Depending on the environment, this value may be different from the host that handled the event, especially if the host handling the events is acting as a collector.
5473+
5474+
type: keyword
5475+
5476+
5477+
5478+
example: `example-host`
5479+
5480+
| extended
5481+
5482+
// ===============================================================
5483+
5484+
|
5485+
[[field-log-syslog-msgid]]
5486+
<<field-log-syslog-msgid, log.syslog.msgid>>
5487+
5488+
| An identifier for the type of Syslog message, if available. Only applicable for RFC 5424 messages.
5489+
5490+
type: keyword
5491+
5492+
5493+
5494+
example: `ID47`
5495+
5496+
| extended
5497+
5498+
// ===============================================================
5499+
54525500
|
54535501
[[field-log-syslog-priority]]
54545502
<<field-log-syslog-priority, log.syslog.priority>>
@@ -5467,6 +5515,22 @@ example: `135`
54675515

54685516
// ===============================================================
54695517

5518+
|
5519+
[[field-log-syslog-procid]]
5520+
<<field-log-syslog-procid, log.syslog.procid>>
5521+
5522+
| The process name or ID that originated the Syslog message, if available.
5523+
5524+
type: keyword
5525+
5526+
5527+
5528+
example: `12345`
5529+
5530+
| extended
5531+
5532+
// ===============================================================
5533+
54705534
|
54715535
[[field-log-syslog-severity-code]]
54725536
<<field-log-syslog-severity-code, log.syslog.severity.code>>
@@ -5503,6 +5567,38 @@ example: `Error`
55035567

55045568
// ===============================================================
55055569

5570+
|
5571+
[[field-log-syslog-structured-data]]
5572+
<<field-log-syslog-structured-data, log.syslog.structured_data>>
5573+
5574+
| Structured data expressed in RFC 5424 messages, if available. These are key-value pairs formed from the structured data portion of the syslog message, as defined in RFC 5424 Section 6.3.
5575+
5576+
type: flattened
5577+
5578+
5579+
5580+
5581+
5582+
| extended
5583+
5584+
// ===============================================================
5585+
5586+
|
5587+
[[field-log-syslog-version]]
5588+
<<field-log-syslog-version, log.syslog.version>>
5589+
5590+
| The version of the Syslog protocol specification. Only applicable for RFC 5424 messages.
5591+
5592+
type: keyword
5593+
5594+
5595+
5596+
example: `1`
5597+
5598+
| extended
5599+
5600+
// ===============================================================
5601+
55065602
|=====
55075603

55085604

experimental/generated/beats/fields.ecs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3837,6 +3837,14 @@
38373837
type: object
38383838
description: The Syslog metadata of the event, if the event was transmitted
38393839
via Syslog. Please see RFCs 5424 or 3164.
3840+
- name: syslog.appname
3841+
level: extended
3842+
type: keyword
3843+
ignore_above: 1024
3844+
description: The device or application that originated the Syslog message, if
3845+
available.
3846+
example: sshd
3847+
default_field: false
38403848
- name: syslog.facility.code
38413849
level: extended
38423850
type: long
@@ -3852,6 +3860,25 @@
38523860
ignore_above: 1024
38533861
description: The Syslog text-based facility of the log event, if available.
38543862
example: local7
3863+
- name: syslog.hostname
3864+
level: extended
3865+
type: keyword
3866+
ignore_above: 1024
3867+
description: The hostname, FQDN, or IP of the machine that originally sent the
3868+
Syslog message. This is sourced from the hostname field of the syslog header.
3869+
Depending on the environment, this value may be different from the host that
3870+
handled the event, especially if the host handling the events is acting as
3871+
a collector.
3872+
example: example-host
3873+
default_field: false
3874+
- name: syslog.msgid
3875+
level: extended
3876+
type: keyword
3877+
ignore_above: 1024
3878+
description: An identifier for the type of Syslog message, if available. Only
3879+
applicable for RFC 5424 messages.
3880+
example: ID47
3881+
default_field: false
38553882
- name: syslog.priority
38563883
level: extended
38573884
type: long
@@ -3861,6 +3888,13 @@
38613888
According to RFCs 5424 and 3164, the priority is 8 * facility + severity.
38623889
This number is therefore expected to contain a value between 0 and 191.'
38633890
example: 135
3891+
- name: syslog.procid
3892+
level: extended
3893+
type: keyword
3894+
ignore_above: 1024
3895+
description: The process name or ID that originated the Syslog message, if available.
3896+
example: 12345
3897+
default_field: false
38643898
- name: syslog.severity.code
38653899
level: extended
38663900
type: long
@@ -3882,6 +3916,21 @@
38823916
If the event source does not specify a distinct severity, you can optionally
38833917
copy the Syslog severity to `log.level`.'
38843918
example: Error
3919+
- name: syslog.structured_data
3920+
level: extended
3921+
type: flattened
3922+
description: Structured data expressed in RFC 5424 messages, if available. These
3923+
are key-value pairs formed from the structured data portion of the syslog
3924+
message, as defined in RFC 5424 Section 6.3.
3925+
default_field: false
3926+
- name: syslog.version
3927+
level: extended
3928+
type: keyword
3929+
ignore_above: 1024
3930+
description: The version of the Syslog protocol specification. Only applicable
3931+
for RFC 5424 messages.
3932+
example: 1
3933+
default_field: false
38853934
- name: network
38863935
title: Network
38873936
group: 2

experimental/generated/csv/fields.csv

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,17 @@ ECS_Version,Indexed,Field_Set,Field,Type,Level,Normalization,Example,Description
411411
8.3.0-dev+exp,true,log,log.origin.file.name,keyword,extended,,Bootstrap.java,The code file which originated the log event.
412412
8.3.0-dev+exp,true,log,log.origin.function,keyword,extended,,init,The function which originated the log event.
413413
8.3.0-dev+exp,true,log,log.syslog,object,extended,,,Syslog metadata
414+
8.3.0-dev+exp,true,log,log.syslog.appname,keyword,extended,,sshd,The device or application that originated the Syslog message.
414415
8.3.0-dev+exp,true,log,log.syslog.facility.code,long,extended,,23,Syslog numeric facility of the event.
415416
8.3.0-dev+exp,true,log,log.syslog.facility.name,keyword,extended,,local7,Syslog text-based facility of the event.
417+
8.3.0-dev+exp,true,log,log.syslog.hostname,keyword,extended,,example-host,The host that originated the Syslog message.
418+
8.3.0-dev+exp,true,log,log.syslog.msgid,keyword,extended,,ID47,An identifier for the type of Syslog message.
416419
8.3.0-dev+exp,true,log,log.syslog.priority,long,extended,,135,Syslog priority of the event.
420+
8.3.0-dev+exp,true,log,log.syslog.procid,keyword,extended,,12345,The process name or ID that originated the Syslog message.
417421
8.3.0-dev+exp,true,log,log.syslog.severity.code,long,extended,,3,Syslog numeric severity of the event.
418422
8.3.0-dev+exp,true,log,log.syslog.severity.name,keyword,extended,,Error,Syslog text-based severity of the event.
423+
8.3.0-dev+exp,true,log,log.syslog.structured_data,flattened,extended,,,Structured data expressed in RFC 5424 messages.
424+
8.3.0-dev+exp,true,log,log.syslog.version,keyword,extended,,1,Syslog protocol version.
419425
8.3.0-dev+exp,true,network,network.application,keyword,extended,,aim,Application level protocol name.
420426
8.3.0-dev+exp,true,network,network.bytes,long,core,,368,Total bytes transferred in both directions.
421427
8.3.0-dev+exp,true,network,network.community_id,keyword,extended,,1:hO+sN4H+MG5MY/8hIrXPqc4ZQz0=,A hash of source and destination IPs and ports.

experimental/generated/ecs/ecs_flat.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5453,6 +5453,17 @@ log.syslog:
54535453
normalize: []
54545454
short: Syslog metadata
54555455
type: object
5456+
log.syslog.appname:
5457+
dashed_name: log-syslog-appname
5458+
description: The device or application that originated the Syslog message, if available.
5459+
example: sshd
5460+
flat_name: log.syslog.appname
5461+
ignore_above: 1024
5462+
level: extended
5463+
name: syslog.appname
5464+
normalize: []
5465+
short: The device or application that originated the Syslog message.
5466+
type: keyword
54565467
log.syslog.facility.code:
54575468
dashed_name: log-syslog-facility-code
54585469
description: 'The Syslog numeric facility of the log event, if available.
@@ -5478,6 +5489,32 @@ log.syslog.facility.name:
54785489
normalize: []
54795490
short: Syslog text-based facility of the event.
54805491
type: keyword
5492+
log.syslog.hostname:
5493+
dashed_name: log-syslog-hostname
5494+
description: The hostname, FQDN, or IP of the machine that originally sent the Syslog
5495+
message. This is sourced from the hostname field of the syslog header. Depending
5496+
on the environment, this value may be different from the host that handled the
5497+
event, especially if the host handling the events is acting as a collector.
5498+
example: example-host
5499+
flat_name: log.syslog.hostname
5500+
ignore_above: 1024
5501+
level: extended
5502+
name: syslog.hostname
5503+
normalize: []
5504+
short: The host that originated the Syslog message.
5505+
type: keyword
5506+
log.syslog.msgid:
5507+
dashed_name: log-syslog-msgid
5508+
description: An identifier for the type of Syslog message, if available. Only applicable
5509+
for RFC 5424 messages.
5510+
example: ID47
5511+
flat_name: log.syslog.msgid
5512+
ignore_above: 1024
5513+
level: extended
5514+
name: syslog.msgid
5515+
normalize: []
5516+
short: An identifier for the type of Syslog message.
5517+
type: keyword
54815518
log.syslog.priority:
54825519
dashed_name: log-syslog-priority
54835520
description: 'Syslog numeric priority of the event, if available.
@@ -5492,6 +5529,17 @@ log.syslog.priority:
54925529
normalize: []
54935530
short: Syslog priority of the event.
54945531
type: long
5532+
log.syslog.procid:
5533+
dashed_name: log-syslog-procid
5534+
description: The process name or ID that originated the Syslog message, if available.
5535+
example: 12345
5536+
flat_name: log.syslog.procid
5537+
ignore_above: 1024
5538+
level: extended
5539+
name: syslog.procid
5540+
normalize: []
5541+
short: The process name or ID that originated the Syslog message.
5542+
type: keyword
54955543
log.syslog.severity.code:
54965544
dashed_name: log-syslog-severity-code
54975545
description: 'The Syslog numeric severity of the log event, if available.
@@ -5523,6 +5571,29 @@ log.syslog.severity.name:
55235571
normalize: []
55245572
short: Syslog text-based severity of the event.
55255573
type: keyword
5574+
log.syslog.structured_data:
5575+
dashed_name: log-syslog-structured-data
5576+
description: Structured data expressed in RFC 5424 messages, if available. These
5577+
are key-value pairs formed from the structured data portion of the syslog message,
5578+
as defined in RFC 5424 Section 6.3.
5579+
flat_name: log.syslog.structured_data
5580+
level: extended
5581+
name: syslog.structured_data
5582+
normalize: []
5583+
short: Structured data expressed in RFC 5424 messages.
5584+
type: flattened
5585+
log.syslog.version:
5586+
dashed_name: log-syslog-version
5587+
description: The version of the Syslog protocol specification. Only applicable for
5588+
RFC 5424 messages.
5589+
example: 1
5590+
flat_name: log.syslog.version
5591+
ignore_above: 1024
5592+
level: extended
5593+
name: syslog.version
5594+
normalize: []
5595+
short: Syslog protocol version.
5596+
type: keyword
55265597
message:
55275598
dashed_name: message
55285599
description: 'For log events the message field contains the log message, optimized

0 commit comments

Comments
 (0)