Skip to content

Commit

Permalink
Pipeline refactoring
Browse files Browse the repository at this point in the history
major performance optimization!!! we have colapsed input with kv, and common with ouput. This should give a major performance boost, specailly for high EPS deployments.

Also, we are now v8 compatible, ecs_compatibility ready
  • Loading branch information
enotspe committed Sep 12, 2022
1 parent 0a3c0fa commit f7203d4
Show file tree
Hide file tree
Showing 18 changed files with 760 additions and 559 deletions.
30 changes: 12 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,28 +173,24 @@ The overall pipeline flow is as follows:

```mermaid
graph LR;
Input-->kv;
kv-->fortimail_2_ecs;
kv-->forticlient_2_ecs;
kv-->fortigate_2_ecs;
kv-->fortisandbox_2_ecs;
kv-->fortiweb_2_ecs;
forticlient_2_ecs-->common_ecs;
fortimail_2_ecs-->common_ecs;
fortigate_2_ecs-->common_ecs;
fortisandbox_2_ecs-->common_ecs;
fortiweb_2_ecs-->common_ecs;
common_ecs-->output;
fortimail-input-kv-->fortimail_2_ecs;
fortiweb-input-kv-->fortiweb_2_ecs;
fortigate-input-kv-->fortigate_2_ecs;
forticlient-input-kv-->forticlient_2_ecs;
fortisandbox-input-kv-->fortisandbox_2_ecs;
fortimail_2_ecs-->common_ecs-output;
fortiweb_2_ecs-->common_ecs-output;
fortigate_2_ecs-->common_ecs-output;
forticlient_2_ecs-->common_ecs-output;
fortisandbox_2_ecs-->common_ecs-output;
```


### Input Syslog
### Input Syslog / KV

Just receives syslog logs and populates `event.module` and `event.dataset` fields depending on udp port.
You can also uncomment Fortianalyzer tags is you are using it for syslog forwarding. Fortianalyzer stamps its own date format to the log, so it needs to be treated different on next pipeline.

### KV Syslog

Splits the original log into key-value pairs and sets the timestamp. Timezone is also obtained from the log itself if FortiOS v6.2+.

### Fortigate 2 ECS
Expand All @@ -206,7 +202,7 @@ Splits the original log into key-value pairs and sets the timestamp. Timezone is
* Populates other ECS fields based on ECS recommendations, like `event.kind`, `event.category`, `event.type`.


### Common ECS
### Common ECS / Output

Populates several ECS fields based on other present fields.

Expand All @@ -222,8 +218,6 @@ Populates several ECS fields based on other present fields.
- `user_agent.*`.
- `network.transport`.

### Output

This is crucial for index strategy 🤯. On Fortigate datastreams are split by `type`.

In our experience, `type=traffic` generates lots of logs, while `type=event` very few. Even inside `type=traffic` you might have that most of your logs have `action=denied`, so you may want to split them even further. Splitting into several datastreams allows to assign different ILMs policies and also will be faster for searching.
Expand Down
25 changes: 25 additions & 0 deletions kibana/fortigate ELK 840.ndjson

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions kibana/fortimail ELK 840.ndjson

Large diffs are not rendered by default.

90 changes: 0 additions & 90 deletions logstash/conf.d/input.conf

This file was deleted.

142 changes: 0 additions & 142 deletions logstash/conf.d/kv_syslog.conf

This file was deleted.

62 changes: 0 additions & 62 deletions logstash/conf.d/output.conf

This file was deleted.

Loading

0 comments on commit f7203d4

Please sign in to comment.