Skip to content

Commit

Permalink
refine som examples and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-e committed Feb 2, 2022
1 parent 7ffe11f commit f3efc9c
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ this can be configured using the fields parameter.
fields: "SrcAddr,DstAddr,SamplerAddress"
```

[any additional links](https://bwnet.belwue.de)
[CryptoPan module](https://github.com/Yawning/cryptopan)
[godoc](https://pkg.go.dev/github.com/bwNetFlow/flowpipeline/segments/modify/anonymize)
[examples using this segment](https://github.com/search?q=%22segment%3A+anonymize%22+extension%3Ayml+repo%3AbwNetFlow%2Fflowpipeline%2Fexamples&type=Code)

Expand Down Expand Up @@ -529,6 +529,8 @@ sequence to export to different places.
The `csv` segment provides an CSV output option. It uses stdout by default, but
can be instructed to write to file using the filename parameter. The fields
parameter can be used to limit which fields will be exported.
If no filename is provided or empty, the output goes to stdout.
By default all fields are exported. To reduce them, use a valid comma seperated list of fields.

```
- segment: csv
Expand Down
6 changes: 3 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ all inputs.
This segment accesses local network interfaces using raw sockets, as for instance tcpdump does.

Relevant examples are:
* [./flowdump](https://github.com/bwNetFlow/flowpipeline/tree/master/examples/flowdump) -- create a tcpdump style view with custom filtering from CLI using local
* [./flowdump/bpf.yml](https://github.com/bwNetFlow/flowpipeline/tree/master/examples/flowdump/bpf.yml) -- create a tcpdump style view with custom filtering from CLI using local
interfaces


Expand All @@ -33,8 +33,8 @@ This segment accesses streams of flows generated by another pipeline using
`kafkaproducer` or [goflow2](https://github.com/netsampler/goflow2).

Relevant examples are:
* [./kafkaflowdump](https://github.com/bwNetFlow/flowpipeline/tree/master/examples/kafkaflowdump) -- create a tcpdump style view with custom filtering from CLI
* [./highlighted_flowdump](https://github.com/bwNetFlow/flowpipeline/tree/master/examples/highlighted_flowdump) -- create a tcpdump style view but use the filtering conditional to highlight desired flows instead of dropping undesired flows
* [./flowdump/kafkaflowdump.yml](https://github.com/bwNetFlow/flowpipeline/tree/master/examples/flowdump/kafkaflowdump.yml) -- create a tcpdump style view with custom filtering from CLI
* [./flowdump/highlight.yml](https://github.com/bwNetFlow/flowpipeline/tree/master/examples/flowdump/highlight.yml) -- create a tcpdump style view but use the filtering conditional to highlight desired flows instead of dropping undesired flows
* [./enricher](https://github.com/bwNetFlow/flowpipeline/tree/master/examples/enricher) -- enrich flows with various bits of data and store them back in Kafka
* [./reducer](https://github.com/bwNetFlow/flowpipeline/tree/master/examples/reducer) -- strip flows of fields and store them back in Kafka
* [./splitter](https://github.com/bwNetFlow/flowpipeline/tree/master/examples/splitter) -- distribute flows to multiple Kafka topics based on a field
Expand Down
File renamed without changes.
22 changes: 22 additions & 0 deletions examples/flowdump/csv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
###############################################################################
# Consume flow messages, it's best to use an enriched topic as flowdump
# printing involves interface descriptions.
- segment: kafkaconsumer
config:
server: kafka01.example.com:9093
topic: flow-messages-enriched
group: myuser-flowdump
user: myuser
pass: $KAFKA_SASL_PASS

###############################################################################
# CSV output with given fields. If no filename is configured output
# is redirected to stdout.
#
# Example list for fields may look like
# "TimeFlowStart,TimeFlowEnd,Bytes,Packets,SrcAddr,SrcPort,FlowDirection,DstAddr,DstPort,Proto"
- segment: csv
config:
filename: ""
fields: ""
File renamed without changes.
19 changes: 19 additions & 0 deletions examples/flowdump/json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
###############################################################################
# Consume flow messages, it's best to use an enriched topic as flowdump
# printing involves interface descriptions.
- segment: kafkaconsumer
config:
server: kafka01.example.com:9093
topic: flow-messages-enriched
group: myuser-flowdump
user: myuser
pass: $KAFKA_SASL_PASS

###############################################################################
# JSON output of flow messages. If no filename is configured output
# is redirected to stdout.
#
- segment: json
config:
filename: ""
20 changes: 20 additions & 0 deletions examples/flowdump/kafkaflowdump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
###############################################################################
# Consume flow messages, it's best to use an enriched topic as flowdump
# printing involves interface descriptions.
- segment: kafkaconsumer
config:
server: kafka01.example.com:9093
topic: flow-messages-enriched
group: myuser-flowdump
user: myuser
pass: $KAFKA_SASL_PASS

###############################################################################
# tcpdump-style output of flows to stdout
- segment: printflowdump
# the lines below are optional and set to default
config:
useprotoname: true
verbose: false
highlight: false

0 comments on commit f3efc9c

Please sign in to comment.