You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/CONFIG.md
+21-6Lines changed: 21 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
## Configuration
2
2
3
-
The pipeline configuration below shows how to configure a pipeline that will read a sysflow stream and push records to the policy engine, which will trigger alerts using a set of runtime policies stored in a `yaml` file. An example pipeline with this configuration looks as follows:
3
+
The pipeline configuration below shows how to configure a pipeline that will read a sysflow stream and push records to the policy engine, which will trigger alerts using a set of runtime policies stored in a `yaml` file. An example pipeline with this configuration looks as follows:
4
4
5
5
```json
6
6
{
@@ -38,7 +38,7 @@ The pipeline configuration below shows how to configure a pipeline that will rea
38
38
This pipeline specifies three built-in plugins:
39
39
40
40
-[sysflowreader](https://github.com/sysflow-telemetry/sf-processor/blob/master/core/processor/processor.go): is a generic reader plugin that ingests sysflow from the driver, caches entities, and presents sysflow objects to a handler object (i.e., an object that implements the [handler interface](https://github.com/sysflow-telemetry/sf-apis/blob/master/go/plugins/handler.go)) for processing. In this case, we are using the [flattener](https://github.com/sysflow-telemetry/sf-processor/blob/master/core/flattener/flattener.go) handler, but custom handlers are possible.
41
-
-[policyengine](https://github.com/sysflow-telemetry/sf-processor/blob/master/core/policyengine/policyengine.go): is the policy engine, which takes [flattened](https://github.com/sysflow-telemetry/sf-apis/blob/master/go/sfgo/flatrecord.go) (row-oriented) SysFlow records as input and outputs [records](https://github.com/sysflow-telemetry/sf-processor/blob/master/core/policyengine/engine/types.go), which represent alerts, or filtered sysflow records depending on the policy engine's _mode_ (more on this later).
41
+
-[policyengine](https://github.com/sysflow-telemetry/sf-processor/blob/master/core/policyengine/policyengine.go): is the policy engine, which takes [flattened](https://github.com/sysflow-telemetry/sf-apis/blob/master/go/sfgo/flatrecord.go) (row-oriented) SysFlow records as input and outputs [records](https://github.com/sysflow-telemetry/sf-processor/blob/master/core/policyengine/engine/types.go), which represent alerts, or filtered sysflow records depending on the policy engine's _mode_ (more on this later).
42
42
-[exporter](https://github.com/sysflow-telemetry/sf-processor/blob/master/core/exporter/exporter.go): takes records from the policy engine, and exports them to ElasticSearch, syslog, file, or terminal, in a JSON format or in Elastic Common Schema (ECS) format. Note that custom export plugins can be created to export to other serialization formats and transport protocols.
43
43
44
44
Each plugin has a set of general attributes that are present in all plugins, and a set of attributes that are custom to the specific plugins. For more details on the specific attributes in this example, see the pipeline configuration [template](https://github.com/sysflow-telemetry/sf-processor/blob/master/driver/pipeline.template.json)
@@ -65,7 +65,7 @@ The policy engine (`"processor": "policyengine"`) plugin is driven by a set of r
65
65
-_mode_ (optional): The mode of the policy engine. Allowed values are:
66
66
-`alert` (default): the policy engine generates rule-based alerts; `alert` is a blocking mode that drops all records that do not match any given rule. If no mode is specified, the policy engine runs in `alert` mode by default.
67
67
-`enrich` for enriching records with additional context from the rule. In contrast to `alert`, this is a non-blocking mode which applies tagging and action enrichments to matching records as defined in the policy file. Non-matching records are passed on "as is".
68
-
68
+
69
69
-_monitor_ (optional): Specifies if changes to the policy file(s) should be monitored and updated in the policy engine.
70
70
-`none` (default): no monitor is used.
71
71
-`local`: the processor will monitor for changes in the policies path and update its rule set if changes are detected.
@@ -115,7 +115,7 @@ Data export is done via bulk ingestion. The ingestion can be controlled by some
115
115
-_es.username_ (required): The ES username.
116
116
-_es.password_ (required): The password for the specified ES user.
117
117
-_buffer_ (optional) The bulk size as the number of records to be ingested at once. Default is `0` but value of `0` indicates record-by-record ingestion which may be highly inefficient.
118
-
-_es.bulk.numWorkers_ (optional): The number of ingestion workers used in parallel. Default is `0` which means that the exporter uses as many workers as there are cores in the machine.
118
+
-_es.bulk.numWorkers_ (optional): The number of ingestion workers used in parallel. Default is `0` which means that the exporter uses as many workers as there are cores in the machine.
119
119
-_es.bulk.flashBuffer_ (optional): The size in bytes of the flush buffer for ingestion. It should be large enough to hold one bulk (the number of records specified in _buffer_), otherwise the bulk is broken into smaller chunks. Default is `5e+6`.
120
120
-_es.bulk.flushTimeout_ (optional): The flush buffer time threshold. Valid values are golang duration strings. Default is `30s`.
121
121
@@ -134,7 +134,7 @@ Export to IBM Findings API allows adding custom findings to the IBM Cloud Securi
134
134
-_findings.sqlquerycrn_ (required):
135
135
-_findings.s3region_ (required):
136
136
-_findings.s3bucket_ (required):
137
-
-_findings.path_ (required):
137
+
-_findings.path_ (required):
138
138
-_findings.pool.capacity_ (optional): The capacity of the findings pool, Default is `250`.
139
139
-_findings.pool.maxage_ (woptional): The maximum age of the security findings in the pool in minutes. Default is `1440`.
140
140
@@ -145,7 +145,7 @@ For more information about inserting custom findings into IBM SCC, refer to [Cus
145
145
It is possible to override any of the custom attributes of a plugin using an environment variable. This is especially useful when operating the processor as a container, where you may have to deploy the processor to multiple nodes, and have attributes that change per node. If an environment variable is set, it overrides the setting inside the config file. The environment variables must follow the following structure:
146
146
147
147
- Environment variables must follow the naming schema `<PLUGIN NAME>_<CONFIG ATTRIBUTE NAME>`
148
-
- The plugin name inside the pipeline configuration file must be all lower case.
148
+
- The plugin name inside the pipeline configuration file must be all lower case.
149
149
150
150
For example, to set the alert mode inside the policy engine, the following environment variable is set:
151
151
@@ -174,3 +174,18 @@ docker run
174
174
-e EXPORTER_PORT=514
175
175
...
176
176
```
177
+
178
+
### Rate limiter configuration (experimental)
179
+
180
+
The `flattener` handler has a built-in time decay filter that can be enabled to reduce even rates in the processor. The filter uses a time-decay bloom filter based on a semantic hashing of records. This means that the filter should only forward one record matching a semantic hash per time decay period. The semantic hash takes into consideration process, flow and event attributes. To enable rate limiting, modify the `sysflowreader` processor as follows:
181
+
182
+
```json
183
+
{
184
+
"processor": "sysflowreader",
185
+
"handler": "flattener",
186
+
"in": "sysflow sysflowchan",
187
+
"out": "flat flattenerchan",
188
+
"filter.enabled": "on|off (default: off)",
189
+
"filter.maxage": "time decay in minutes (default: 24H)"
0 commit comments