Skip to content

Commit

Permalink
[Auditbeat] Change event.kind=error to event.kind=event to comply wit…
Browse files Browse the repository at this point in the history
…h ECS (#20685)

* Change event.kind=error to event.kind=event to coply with ECS

* Add CHANGELOG entry

(cherry picked from commit 8848898)
  • Loading branch information
marc-gr authored and mergify-bot committed Sep 2, 2021
1 parent 3a3e96b commit 049dbea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions x-pack/auditbeat/module/system/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const (

eventTypeState = "state"
eventTypeEvent = "event"
eventTypeError = "error"
)

type eventAction uint8
Expand Down Expand Up @@ -247,7 +246,7 @@ func (ms *MetricSet) reportState(report mb.ReporterV2) error {
report.Event(event)
} else {
ms.log.Warn(p.Error)
report.Event(ms.processEvent(p, eventTypeError, eventActionProcessError))
report.Event(ms.processEvent(p, eventTypeEvent, eventActionProcessError))
}
}

Expand Down Expand Up @@ -287,7 +286,7 @@ func (ms *MetricSet) reportChanges(report mb.ReporterV2) error {
report.Event(ms.processEvent(p, eventTypeEvent, eventActionProcessStarted))
} else {
ms.log.Warn(p.Error)
report.Event(ms.processEvent(p, eventTypeError, eventActionProcessError))
report.Event(ms.processEvent(p, eventTypeEvent, eventActionProcessError))
}
}

Expand Down

0 comments on commit 049dbea

Please sign in to comment.