Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer error #17

Open
hoangvu304 opened this issue Feb 17, 2020 · 1 comment
Open

Analyzer error #17

hoangvu304 opened this issue Feb 17, 2020 · 1 comment

Comments

@hoangvu304
Copy link

Hi @bitkeks ,
Thank for your app. I try it today, capture some packet from a ASR 1002 router netflow v9 export.
But when I analyzer .gz file, it's show error:
(p3venv) [vuht@dashboard python-netflow-v9-softflowd]$ python analyzer.py -f 1581912445.gz
Traceback (most recent call last):
File "analyzer.py", line 215, in
for flow in sorted(flows, key=lambda x: x["FIRST_SWITCHED"]):
File "analyzer.py", line 215, in
for flow in sorted(flows, key=lambda x: x["FIRST_SWITCHED"]):
KeyError: 'FIRST_SWITCHED'

@bitkeks
Copy link
Owner

bitkeks commented Mar 19, 2020

Hi @hoangvu304,
sorry for the long delay! Do you still have your capture file? I'd be interested in seeing, which fields are actually contained in your exports. You could try to add a print(flows[0]) in line 242

flows = data[key]["flows"]
for flow in sorted(flows, key=lambda x: x["FIRST_SWITCHED"]):

This might reveal the fields. Sadly, the docs on the ASR 1002 do not state which fields are exported, but maybe we can figure out if there's another field that has the same effect (timestamp).
Or did you use "Flexible Netflow"? This seems to be an newer, extended NetFlow v9 implementation by Cisco which is configured differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants