Skip to content
This repository has been archived by the owner on Nov 24, 2019. It is now read-only.

Update patterns, add usg.fw.action #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions filebeat/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@
- name: facility
type: keyword
description: '...'
- name: action
type: keyword
description: '...'
- name: src_ip_geoip
type: group
description: >
Expand Down
3 changes: 3 additions & 0 deletions filebeat/module/usg/fw/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
- name: facility
type: keyword
description: '...'
- name: action
type: keyword
description: '...'
- name: src_ip_geoip
type: group
description: >
Expand Down
18 changes: 14 additions & 4 deletions filebeat/module/usg/fw/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
"patterns": [
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: \\[%{GREEDYDATA:usg.fw.ruleset}\\]IN=%{DATA:usg.fw.in} OUT=%{DATA:usg.fw.out} MAC=%{GREEDYDATA:usg.fw.mac} SRC=%{IP:usg.fw.src_ip} DST=%{IP:usg.fw.dst_ip} LEN=%{INT:usg.fw.len} TOS=%{WORD:usg.fw.tos} PREC=%{WORD:usg.fw.prec} TTL=%{INT:usg.fw.ttl} ID=%{INT:usg.fw.id} DF PROTO=%{WORD:usg.fw.proto} SPT=%{INT:usg.fw.src_port} DPT=%{INT:usg.fw.dest_port} WINDOW=%{INT:usg.fw.window} RES=%{WORD:usg.fw.res}",
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: \\[%{GREEDYDATA:usg.fw.ruleset}\\]IN=%{DATA:usg.fw.in} OUT=%{DATA:usg.fw.out} MAC=%{GREEDYDATA:usg.fw.mac} SRC=%{IP:usg.fw.src_ip} DST=%{IP:usg.fw.dst_ip} LEN=%{INT:usg.fw.len} TOS=%{WORD:usg.fw.tos} PREC=%{WORD:usg.fw.prec} TTL=%{INT:usg.fw.ttl} ID=%{INT:usg.fw.id} PROTO=%{WORD:usg.fw.proto} SPT=%{INT:usg.fw.src_port} DPT=%{INT:usg.fw.dest_port} WINDOW=%{INT:usg.fw.window} RES=%{WORD:usg.fw.res}",
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: \\[%{GREEDYDATA:usg.fw.ruleset}\\]IN=%{DATA:usg.fw.in} OUT=%{DATA:usg.fw.out} MAC=%{GREEDYDATA:usg.fw.mac} SRC=%{IP:usg.fw.src_ip} DST=%{IP:usg.fw.dst_ip} LEN=%{INT:usg.fw.len} TOS=%{WORD:usg.fw.tos} PREC=%{WORD:usg.fw.prec} TTL=%{INT:usg.fw.ttl} ID=%{INT:usg.fw.id} DF PROTO=%{WORD:usg.fw.proto}",
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: \\[%{GREEDYDATA:usg.fw.ruleset}\\]IN=%{DATA:usg.fw.in} OUT=%{DATA:usg.fw.out} MAC=%{GREEDYDATA:usg.fw.mac} SRC=%{IP:usg.fw.src_ip} DST=%{IP:usg.fw.dst_ip} LEN=%{INT:usg.fw.len} TOS=%{WORD:usg.fw.tos} PREC=%{WORD:usg.fw.prec} TTL=%{INT:usg.fw.ttl} ID=%{INT:usg.fw.id} PROTO=%{WORD:usg.fw.proto} SPT=%{INT:usg.fw.src_port} DPT=%{INT:usg.fw.dest_port}",
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: \\[%{GREEDYDATA:usg.fw.ruleset}\\]IN=%{DATA:usg.fw.in} OUT=%{DATA:usg.fw.out} MAC=%{GREEDYDATA:usg.fw.mac} SRC=%{IP:usg.fw.src_ip} DST=%{IP:usg.fw.dst_ip} LEN=%{INT:usg.fw.len} TOS=%{WORD:usg.fw.tos} PREC=%{WORD:usg.fw.prec} TTL=%{INT:usg.fw.ttl} ID=%{INT:usg.fw.id} PROTO=%{WORD:usg.fw.proto}",
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: \\[%{GREEDYDATA:usg.fw.ruleset}\\]IN=%{DATA:usg.fw.in} OUT=%{DATA:usg.fw.out} MAC=%{GREEDYDATA:usg.fw.mac} SRC=%{IP:usg.fw.src_ip} DST=%{IP:usg.fw.dst_ip} LEN=%{INT:usg.fw.len} .* FLOWLBL=%{INT:usg.fw.flow_label} PROTO=%{WORD:usg.fw.proto} SPT=%{INT:usg.fw.src_port} DPT=%{INT:usg.fw.dst_port}",
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: \\[%{GREEDYDATA:usg.fw.ruleset}\\]IN=%{DATA:usg.fw.in} OUT=%{DATA:usg.fw.out} MAC=%{GREEDYDATA:usg.fw.mac} SRC=%{IP:usg.fw.src_ip} DST=%{IP:usg.fw.dst_ip} LEN=%{INT:usg.fw.len} .* PROTO=%{WORD:usg.fw.proto} SPT=%{INT:usg.fw.src_port} DPT=%{INT:usg.fw.dst_port} LEN=%{INT:usg.fw.len}",
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: \\[%{GREEDYDATA:usg.fw.ruleset}\\]IN=%{DATA:usg.fw.in} OUT=%{DATA:usg.fw.out} MAC=%{GREEDYDATA:usg.fw.mac} SRC=%{IP:usg.fw.src_ip} DST=%{IP:usg.fw.dst_ip} LEN=%{INT:usg.fw.len} .* FLOWLBL=%{INT:usg.fw.flow_label} PROTO=%{WORD:usg.fw.proto} SPT=%{INT:usg.fw.src_port} DPT=%{INT:usg.fw.dest_port}",
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: \\[%{GREEDYDATA:usg.fw.ruleset}\\]IN=%{DATA:usg.fw.in} OUT=%{DATA:usg.fw.out} MAC=%{GREEDYDATA:usg.fw.mac} SRC=%{IP:usg.fw.src_ip} DST=%{IP:usg.fw.dst_ip} LEN=%{INT:usg.fw.len} .* PROTO=%{WORD:usg.fw.proto} SPT=%{INT:usg.fw.src_port} DPT=%{INT:usg.fw.dest_port}",
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: \\[%{GREEDYDATA:usg.fw.ruleset}\\]IN=%{DATA:usg.fw.in} OUT=%{DATA:usg.fw.out} MAC=%{GREEDYDATA:usg.fw.mac} SRC=%{IP:usg.fw.src_ip} DST=%{IP:usg.fw.dst_ip} LEN=%{INT:usg.fw.len} .* PROTO=%{WORD:usg.fw.proto} TYPE=%{INT:usg.fw.type} CODE=%{INT:usg.fw.code}",
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: \\[%{GREEDYDATA:usg.fw.ruleset}\\]IN=%{DATA:usg.fw.in} OUT=%{DATA:usg.fw.out} MAC=%{GREEDYDATA:usg.fw.mac} SRC=%{IP:usg.fw.src_ip} DST=%{IP:usg.fw.dst_ip} LEN=%{INT:usg.fw.len} TOS=%{WORD:usg.fw.tos} PREC=%{WORD:usg.fw.prec} TTL=%{INT:usg.fw.ttl} ID=%{INT:usg.fw.id} DF PROTO=%{WORD:usg.fw.proto}",
"^%{SYSLOGTIMESTAMP:usg.fw.date} %{HOSTNAME:usg.fw.host} %{DATA:usg.fw.facility}: %{GREEDYDATA:usg.fw.other}"
],
"ignore_missing": true
Expand Down Expand Up @@ -53,6 +54,15 @@
"target_field": "usg.fw.dst_ip_geoip",
"ignore_failure": true
}
},
{
"gsub": {
"field": "usg.fw.ruleset",
"target_field": "usg.fw.action",
"pattern": ".*-([A-Z])",
"replacement": "$1",
"ignore_failure": true
}
}
],
"on_failure": [
Expand All @@ -63,4 +73,4 @@
}
}
]
}
}