Suggestion for field name

I'm parsing logs from e2guardian - a web filter. One of the fields is basically "why" a request was block. For e.g.:

2020.04.06 12:21:37     -   *DENIED* Blocked site:  GET     0       0       - 1403     -      no_name_group

I'm looking for suggestions for a field name to use for this. Currently I'm just calling this "why"

match => { "message" => "(?<e2_timestamp>\d\d\d\d\.\d\d\.\d\d \d\d:\d\d:\d\d)\t%{}\t%{IP:client.address}\t%{NOTSPACE:url.full}\t%{NOTSPACE:action} ?(hw\d+: )?(?<why>[^\t]+)?\t%{WORD:http.request.method}\t%{NUMBER:http.request.bytes}\t\d+\t[^\t]+\t[^\t]+\t%{NUMBER:http.response.status_code}\t[^\t]+\t%{IP:client.ip}" }

but that currently isn't defined.

Hi @opoplawski!

The action being observed in an event should be captured in event.action. There's also an opportunity to leverage the categorization fields to better capture the "what it is" of the event.

For example, using the current example web filter event:

event.kind: "event"
event.category: [ "network" ]
event.type: [ "connection", "denied" ]
event.outcome: "success"

The docs covering the different event field set can be found here.

1 Like

Looking at the grok, it seems like there's both an action and a reason defined by the source, however.

Perhaps adding event.reason would be useful, actually :slight_smile:

Note: I see the "action" field is not using the ECS field, I would recommend moving it to %{NOTSPACE:event.action}

Thanks. Two questions:

  • Is event type "access" relevant here as well?
  • Is event.outcome "success" correct for a connection being denied?

RIght, it's the reason that I'm having a hard time figuring out where to place.

Is event type "access" relevant here as well?

I would say no since the connection is being denied and the resource ultimately wasn't accessed.

Is event.outcome "success" correct for a connection being denied?

From the perspective of the entity that emitted the event, the web filter, the blocked connection was a successful and expected operation, so success is appropriate.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.