225 Commits

Author SHA1 Message Date
schadom
3b4c4075db
Fix syntax error 2021-02-06 01:22:53 +01:00
Manuel Kasper
1a7a439c34
Merge pull request #99 from JackSlateur/ip2as_netflow9
netflowv9: always try to map IP to ASN
2021-01-08 15:51:37 +01:00
Alexandre Bruyelles
696037ef08
netflowv9: always try to map IP to ASN
Some netflow agents truncates 32b ASN to a 16b fields
Always checking the received ASN against our mapping should fix
that issue

Signed-off-by: Alexandre Bruyelles <git@jack.fr.eu.org>
2021-01-08 11:45:13 +01:00
Manuel Kasper
93fb606c46
Merge pull request #95 from schadom/master
Optimized the script to work with empty rrd directories
2020-11-27 20:12:17 +01:00
schadom
3d0412f958
Optimized the script to work with empty rrd directories
Optimized the script to run without errors if empty directories in data/rrd are present.
2020-11-27 09:55:21 +01:00
Manuel Kasper
ca631c17f8
Merge pull request #93 from Kegeruneku/fix_perl_bareword
rrd-extractstats.pl: fix bareword (disallowed by use strict, fixes #91)
2020-08-10 20:06:01 +02:00
Matthieu Cerda
569e8334c1 rrd-extractstats.pl: fix bareword (disallowed by use strict, fixes #91) 2020-08-10 13:56:38 +02:00
Manuel Kasper
4b90a1fa78
Merge pull request #92 from alarig/master
contrib/generate-asinfo.py: Correcting syntax errors
2020-08-01 13:15:56 +02:00
Alarig Le Lay
4de34d5f11
generate-asinfo.py: Putting ",country" at the end of the name to respect the shipped asinfo.txt format 2020-08-01 12:50:08 +02:00
Alarig Le Lay
f29a39dd49
generate-asinfo.py: Removing leading on the country 2020-08-01 12:43:14 +02:00
Alarig Le Lay
c233dd1ff0
contrib/generate-asinfo.py: Correcting syntax errors
alarig@jeunet ~ % (echo begin; echo verbose; for i in `seq 1 65535`; do echo "AS$i"; done; echo end) | nc whois.cymru.com 43 | ./generate-asinfo.py > asinfo.txt
  File "./generate-asinfo.py", line 30
    if name.startswith('- '):
                            ^
TabError: inconsistent use of tabs and spaces in indentation
zsh: done       ( echo begin; echo verbose; for i in `seq 1 65535`; do; echo "AS$i"; done;  ;  | nc whois.cymru.com 43 |
zsh: exit 1     ./generate-asinfo.py > asinfo.txt

alarig@jeunet ~ % (echo begin; echo verbose; for i in `seq 1 65535`; do echo "AS$i"; done; echo end) | nc whois.cymru.com 43 | ./generate-asinfo.py > asinfo.txt
  File "./generate-asinfo.py", line 33
    print "%s\t%s\t%s\t%s" % (asn,macro,name,country)
          ^
SyntaxError: invalid syntax
zsh: done       ( echo begin; echo verbose; for i in `seq 1 65535`; do; echo "AS$i"; done;  ;  | nc whois.cymru.com 43 |
zsh: exit 1     ./generate-asinfo.py > asinfo.txt
2020-08-01 11:22:28 +02:00
Manuel Kasper
ab8a48e33e
Merge pull request #87 from rlanyi/extractstats-skipifnotmodified
Skip analyzing traffic data if RRD file hasn't changed since last run
2020-03-23 08:49:58 +01:00
Robert Lanyi
e4a06d5b9d Skip getting traffic data if RRD file hasn't changed since last run 2020-03-22 20:30:39 +01:00
Manuel Kasper
6cc32ebaa6
Merge pull request #86 from rlanyi/extractstats-multithread
Add THREADS env var to control number of threads
2020-03-22 16:58:47 +01:00
Robert Lanyi
a0ffd9d867 Fix warning when THREADS env var is missing 2020-03-22 14:59:37 +01:00
Robert Lanyi
858c646e01 Change default number of threads to 1 (original behavior) 2020-03-22 14:44:17 +01:00
Robert Lanyi
37a7633ded Add THREADS env var to control number of threads 2020-03-21 18:44:10 +01:00
Manuel Kasper
9c4f605c43
Merge pull request #85 from rlanyi/extractstats-multithread
Add multi-threading to rrd-extractstats.pl
2020-03-21 17:19:02 +01:00
Robert Lanyi
245dcd591a Add multi-threading to rrd-extractstats.pl 2020-03-21 15:26:53 +01:00
Manuel Kasper
5b14fb721f
Merge pull request #84 from pirmins/master
Update README.md
2019-12-17 12:05:43 +01:00
pirmins
3cc3ab7b58
Update README.md 2019-12-17 09:17:00 +01:00
Manuel Kasper
52e0848aa3
Merge pull request #77 from JackSlateur/cleanup
Do not import inet_pton, we never use it
2018-08-06 09:17:51 +02:00
Manuel Kasper
0dbec1cd8e
Merge pull request #76 from JackSlateur/fix-68
Escape sqlite's tablenames
2018-08-06 09:17:22 +02:00
Alexandre Bruyelles
ca26c5a179
do not import inet_pton, we never use it
Signed-off-by: Alexandre Bruyelles <git@jack.fr.eu.org>
2018-08-04 23:41:51 +02:00
Alexandre Bruyelles
b741f6704c
Escape sqlite's tablenames
Fix https://github.com/manuelkasper/AS-Stats/issues/68
This is a commit from https://github.com/falz, thanks to him

Signed-off-by: Alexandre Bruyelles <git@jack.fr.eu.org>
2018-08-04 23:14:58 +02:00
Manuel Kasper
835aa229ef
Merge pull request #75 from JackSlateur/master
netflow_v9: support ip2asn mapping for ipv4 as well
2018-07-17 09:39:53 +02:00
Alexandre Bruyelles
761520b725
netflow_v9: support ip2asn mapping for ipv4 as well
Signed-off-by: Alexandre Bruyelles <abruyelles@odiso.com>
2018-07-16 20:32:01 +02:00
Manuel Kasper
d3b5adfd48
Merge pull request #73 from rafeurdean/upstream
Upstream
2018-05-12 20:56:54 +02:00
Raf
fc8e8e8683 Use ip2asn to provide a workaround for CSCuf86015 in NetFlow v9 2018-05-12 15:18:32 +02:00
Raf
6cde365b82 Revert to defaults from upstream 2018-05-12 13:08:10 +02:00
Raf
852cc43567 - Option to stack IPv4 and IPv6 together
- defaults update
2018-05-10 13:19:25 +02:00
Manuel Kasper
5b1f2af37a Merge pull request #67 from JackSlateur/master
Support optional IP to ASN mapping for netflow v5 / sFlow
2017-04-02 15:47:09 +02:00
jack
2017097b30
Fix typo
Signed-off-by: jack <jack@k-net.pro>
2017-04-02 14:08:17 +02:00
jack
d0599e60ae
Support optional IP to ASN mapping for sFlow
Signed-off-by: jack <jack@k-net.pro>
2017-03-16 15:54:06 +01:00
jack
fc2a0bfb8c
Update README
Signed-off-by: jack <jack@k-net.pro>
2017-03-10 15:12:24 +01:00
jack
c447f9d096
Support optional IP to ASN mapping for netflow v5
Signed-off-by: jack <jack@k-net.pro>
2017-03-10 15:11:05 +01:00
Manuel Kasper
104d4c38b7 Merge pull request #60 from maxlareo/master
generate-asinfo.py: get country code from last field
2017-02-28 09:50:55 +01:00
Manuel Kasper
1e27922c1d Merge pull request #59 from JackSlateur/master
Allow links selection on graphs
2017-02-28 09:50:36 +01:00
jack
152ea16ced
Drop unused files
Signed-off-by: jack <jack@k-net.pro>
2017-02-25 23:51:16 +01:00
jack
903dd3b36f
Update readme
Signed-off-by: jack <jack@k-net.pro>
2017-02-25 16:41:58 +01:00
jack
d6c4c0ff95
Store statistics into a sqlite3 database. This way, we can quickly filter links on the top page, deprecating the linkusage page
Signed-off-by: jack <jack@k-net.pro>
2017-02-25 15:58:28 +01:00
Manuel Kasper
f8fe1b74bf Add note about current status 2017-02-15 18:26:08 +01:00
Maxime Lareo
a715324929
generate-asinfo.py: get country code from last field 2017-02-15 16:42:56 +01:00
Manuel Kasper
fa8f3c8ac9 Merge pull request #55 from JackSlateur/master
sFlow: handle multiple ASN, if you want to merge the statistics when …
2017-01-20 21:09:48 +00:00
jack
84931f2eca Don't set asn as value, but key, thanks manuelkasper
Signed-off-by: jack <jack@k-net.pro>
2017-01-20 20:44:05 +01:00
jack
79abab60d3 sFlow: handle multiple ASN, if you want to merge the statistics when you own more than a single network
Signed-off-by: jack <jack@k-net.pro>
2017-01-19 15:02:21 +01:00
Manuel Kasper
ee65b8dd82 Merge pull request #54 from JackSlateur/master
Support extendedflow
2016-11-18 18:21:41 +01:00
jack
d649faf8d8 Forgot that code ..
Signed-off-by: jack <jack@k-net.pro>
2016-11-18 17:44:24 +01:00
jack
fc940ce20f Support extendedflow
Signed-off-by: jack <jack@k-net.pro>
2016-11-18 17:39:27 +01:00
Manuel Kasper
523578f432 Merge pull request #49 from clobrother/master
Don't include v6 stats inside v4
2016-06-21 08:57:10 +02:00