-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from bwNetFlow/flowdump
flowdump: show ASNs in verbose mode, add various bits of docs and fixes
- Loading branch information
Showing
9 changed files
with
130 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Flowpipeline Example Collection | ||
|
||
This collection of example configs is supposed to help users get started using | ||
different use cases. A grouped and alphabetically sorted | ||
[reference](https://github.com/bwNetFlow/flowpipeline/blob/master/CONFIGURATION.md), | ||
might be the best resource when trying to achieve a specific outcome, this | ||
short guide however tries to give new users some idea of what is possible with | ||
this tool and present existing users with additional options. | ||
|
||
The most natural way to group these examples is to list them by which input | ||
segment they use, aka "where they get flows from". Note that these input | ||
segments can be freely interchanged for one another, and all examples work with | ||
all inputs. | ||
|
||
|
||
## `bpf` | ||
This segment accesses local network interfaces using raw sockets, as for instance tcpdump does. | ||
|
||
Relevant examples are: | ||
* [./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 | ||
|
||
|
||
## `goflow` | ||
This segment allows listening for raw IPFIX, Netflow, or sFlow by using goflow2's API. | ||
|
||
Relevant examples are: | ||
* [./localkafka/write.yml](https://github.com/bwNetFlow/flowpipeline/tree/master/examples/localkafka) -- emulate plain goflow2 and write flows to a Kafka topic for the following section to use | ||
|
||
|
||
## `kafkaconsumer` | ||
This segment accesses streams of flows generated by another pipeline using | ||
`kafkaproducer` or [goflow2](https://github.com/netsampler/goflow2). | ||
|
||
Relevant examples are: | ||
* [./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 | ||
* [./anonymizer](https://github.com/bwNetFlow/flowpipeline/tree/master/examples/anonymizer) -- anonymize IP addresses using Crypto PAn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters