grafolean icon indicating copy to clipboard operation
grafolean copied to clipboard

Netflow - Juniper

Open kleper opened this issue 8 months ago • 1 comments

I trying to test this application with some Netflow from Juniper devices, but I have this error: grafolean-netflow-writer | File "./pynetflow/netflow/ipfix.py", line 741, in init grafolean-netflow-writer | AttributeError: 'NoneType' object has no attribute 'type' grafolean-netflow-writer | 2025-05-01 15:41:40.756 | ERR | Error writing line, skipping... grafolean-netflow-writer | Traceback (most recent call last): grafolean-netflow-writer | File "./netflowwriter.py", line 136, in process_named_pipe grafolean-netflow-writer | File "./pynetflow/netflow/utils.py", line 100, in parse_packet grafolean-netflow-writer | File "./pynetflow/netflow/ipfix.py", line 904, in init grafolean-netflow-writer | File "./pynetflow/netflow/ipfix.py", line 840, in init grafolean-netflow-writer | File "./pynetflow/netflow/ipfix.py", line 741, in init grafolean-netflow-writer | AttributeError: 'NoneType' object has no attribute 'type'

I verify all is running, I'm receiving netflow to the server on port 2055, but it seems the netflow writer is not able to read my data, any ideas about this?

kleper avatar May 01 '25 15:05 kleper

It has been a while since I looked at this code... It is also in pynetflow, an (awesome) library the grafolean netflow bot uses, but to me it looks like some unsupported IPFIX field is being encountered. The handling in pynetflow seems to not expect that, so the exception is thrown when it tries to access field type on None. Upgrading pynetflow might help, the version used is 0.10.4 while there seems to be 0.12.2 available. Alternatively, we could also fix it by adding the relevant information.

However, to be honest, I haven't worked on Grafolean for quite some time now and I do not use it myself anymore, so a workaround would be preferable. Also, last time I checked the build system didn't work anymore due to changes in GitHub Actions and while this is all solvable, it would take some time to fix the process. Do you have an option to try a different version of NetFlow on the devices or to disable some of the information being sent?

grafolean avatar May 04 '25 19:05 grafolean