Skip to content

Commit 1f95e70

Browse files
authored
[Microsoft SQL Server] Fix field conflict (#2894)
Fix field conflict for winlog.record_id.
1 parent d543323 commit 1f95e70

6 files changed

Lines changed: 17 additions & 7 deletions

File tree

packages/microsoft_sqlserver/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "0.4.3"
3+
changes:
4+
- description: Fix field conflict for `winlog.record_id`
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/2894
27
- version: "0.4.2"
38
changes:
49
- description: Fix mapper_parsing_exception when parsing sqlserver.audit.event_time.

packages/microsoft_sqlserver/data_stream/audit/_dev/test/pipeline/test-events.json-expected.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
"Classic"
125125
],
126126
"provider_name": "MSSQLSERVER$AUDIT",
127-
"record_id": 17607,
127+
"record_id": "17607",
128128
"user": {
129129
"domain": "NT SERVICE",
130130
"identifier": "S-1-5-80-3880718306-3832830129-1677859214-2598158968-1052248003",
@@ -258,7 +258,7 @@
258258
"Classic"
259259
],
260260
"provider_name": "MSSQLSERVER$AUDIT",
261-
"record_id": 26134,
261+
"record_id": "26134",
262262
"user": {
263263
"domain": "NT SERVICE",
264264
"identifier": "S-1-5-80-3880718306-3832830129-1677859214-2598158968-1052248003",
@@ -389,7 +389,7 @@
389389
"Classic"
390390
],
391391
"provider_name": "MSSQLSERVER$AUDIT",
392-
"record_id": 27810,
392+
"record_id": "27810",
393393
"user": {
394394
"domain": "NT SERVICE",
395395
"identifier": "S-1-5-80-3880718306-3832830129-1677859214-2598158968-1052248003",
@@ -516,7 +516,7 @@
516516
"Classic"
517517
],
518518
"provider_name": "MSSQLSERVER$AUDIT",
519-
"record_id": 28002,
519+
"record_id": "28002",
520520
"user": {
521521
"domain": "NT SERVICE",
522522
"identifier": "S-1-5-80-3880718306-3832830129-1677859214-2598158968-1052248003",

packages/microsoft_sqlserver/data_stream/audit/elasticsearch/ingest_pipeline/default.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,11 @@ processors:
12291229
- set:
12301230
field: user.target.id
12311231
copy_from: sqlserver.audit.target_server_principal_sid
1232+
1233+
- convert:
1234+
field: winlog.record_id
1235+
type: string
1236+
ignore_missing: true
12321237
##
12331238
# Clean up
12341239
##

packages/microsoft_sqlserver/data_stream/audit/fields/winlog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
The name of the channel from which this record was read. This value is one of the names from the `event_logs` collection in the configuration.
7373
7474
- name: record_id
75-
type: long
75+
type: keyword
7676
required: true
7777
description: >
7878
The record ID of the event log record. The first record written to an event log is record number 1, and other records are numbered sequentially. If the record number reaches the maximum value (2^32^ for the Event Logging API and 2^64^ for the Windows Event Log API), the next record number will be 0.

packages/microsoft_sqlserver/docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ The SQL Server audit dataset provides events from the configured Windows event l
133133
| winlog.process.thread.id | | long |
134134
| winlog.provider_guid | A globally unique identifier that identifies the provider that logged the event. | keyword |
135135
| winlog.provider_name | The source of the event log record (the application or service that logged the record). | keyword |
136-
| winlog.record_id | The record ID of the event log record. The first record written to an event log is record number 1, and other records are numbered sequentially. If the record number reaches the maximum value (2^32^ for the Event Logging API and 2^64^ for the Windows Event Log API), the next record number will be 0. | long |
136+
| winlog.record_id | The record ID of the event log record. The first record written to an event log is record number 1, and other records are numbered sequentially. If the record number reaches the maximum value (2^32^ for the Event Logging API and 2^64^ for the Windows Event Log API), the next record number will be 0. | keyword |
137137
| winlog.related_activity_id | A globally unique identifier that identifies the activity to which control was transferred to. The related events would then have this identifier as their `activity_id` identifier. | keyword |
138138
| winlog.task | The task defined in the event. Task and opcode are typically used to identify the location in the application from where the event was logged. The category used by the Event Logging API (on pre Windows Vista operating systems) is written to this field. | keyword |
139139
| winlog.user.domain | The domain that the account associated with this event is a member of. | keyword |

packages/microsoft_sqlserver/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: 1.0.0
22
name: microsoft_sqlserver
33
title: "Microsoft SQL Server"
4-
version: 0.4.2
4+
version: 0.4.3
55
license: basic
66
description: Collect audit events from Microsoft SQL Server with Elastic Agent.
77
type: integration

0 commit comments

Comments
 (0)