Skip to content

Commit adb02ea

Browse files
committed
Update to 2020 in file headers; update the analyzer file name in README
The analyzer is now found in analyzer.py and uses the '-f' flag for GZIPed input files. Bundled with the previous PR commit, this update should now be clearer.
1 parent 52d357b commit adb02ea

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016-2019 Dominik Pataky <[email protected]>
3+
Copyright (c) 2016-2020 Dominik Pataky <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ Version 9 is the first NetFlow version using templates.
55
Templates make dynamically sized and configured NetFlow data flowsets possible,
66
which makes the collector's job harder.
77

8-
Copyright 2016-2019 Dominik Pataky <[email protected]>
8+
Copyright 2016-2020 Dominik Pataky <[email protected]>
99

1010
Licensed under MIT License. See LICENSE.
1111

1212

1313
## Using the collector and analyzer
14-
In this repo you also find `main.py` and `analyze_json.py`.
14+
In this repo you also find `main.py` and `analyzer.py`.
1515

1616
To start an example collector run `python3 main.py -p 9000 -D`. This will run
1717
a collector at port 9000 in debug mode. Point your flow exporter to this port on
@@ -21,8 +21,9 @@ need to expire first).
2121
After you collected some data, `main.py` exports them into GZIP files, simply
2222
named `<timestamp>.gz`.
2323

24-
To analyze the saved traffic, run `analyze_json.py -f <gzip file>`. In my example
25-
script this will look like the following, with resolved hostnames and services, transfered bytes and connection duration:
24+
To analyze the saved traffic, run `analyzer.py -f <gzip file>`. In my example
25+
script this will look like the following, with resolved hostnames and services,
26+
transfered bytes and connection duration:
2627

2728
2017-10-28 23:17.01: SSH | 4.25M | 15:27 min | localmachine-2 (<IPv4>) to localmachine-1 (<IPv4>)
2829
2017-10-28 23:17.01: SSH | 4.29M | 16:22 min | remotemachine (<IPv4>) to localmachine-2 (<IPv4>)
@@ -31,8 +32,10 @@ script this will look like the following, with resolved hostnames and services,
3132
2017-10-28 23:23.01: SSH | 93.79M | 21 sec | remotemachine (<IPv4>) to localmachine-2 (<IPv4>)
3233
2017-10-28 23:51.01: SSH | 14.08M | 1:23.09 hours | remotemachine (<IPv4>) to localmachine-2 (<IPv4>)
3334

34-
Feel free to customize the analyzing script, e.g. make it print some
35-
nice graphs or calculate broader statistics.
35+
Feel free to customize the analyzing script, e.g. make it print some nice graphs or calculate broader statistics.
36+
37+
**Please note that the analyzer is experimental and has some rough edges. Do not rely on it in monitoring use cases!**
38+
3639

3740
## Resources
3841
* [Cisco NetFlow v9 paper](http://www.cisco.com/en/US/technologies/tk648/tk362/technologies_white_paper09186a00800a3db9.html)
@@ -43,7 +46,7 @@ I have specifically written this script in combination with NetFlow exports from
4346
[softflowd](https://github.com/djmdjm/softflowd) v0.9.9 - it should work with every
4447
correct NetFlow v9 implementation though.
4548

46-
### Running tests
49+
### Running and creating tests
4750
The file `tests.py` contains some tests based on real softflowd export packets.
4851
To create the test packets try the following:
4952

analyzer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Example analyzing script for saved exports (by main.py, as JSON).
55
This file belongs to https://github.com/bitkeks/python-netflow-v9-softflowd.
66
7-
Copyright 2017-2019 Dominik Pataky <[email protected]>
7+
Copyright 2017-2020 Dominik Pataky <[email protected]>
88
Licensed under MIT License. See LICENSE.
99
"""
1010

main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Example collector script for NetFlow v1, v5, and v9.
55
This file belongs to https://github.com/bitkeks/python-netflow-v9-softflowd.
66
7-
Copyright 2017-2019 Dominik Pataky <[email protected]>
7+
Copyright 2017-2020 Dominik Pataky <[email protected]>
88
Licensed under MIT License. See LICENSE.
99
"""
1010

tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
softflowd export based on a sample PCAP capture file. They consist of one
77
export with the templates and three without.
88
9-
Copyright 2017-2019 Dominik Pataky <[email protected]>
9+
Copyright 2017-2020 Dominik Pataky <[email protected]>
1010
Licensed under MIT License. See LICENSE.
1111
"""
1212

0 commit comments

Comments
 (0)