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

Is there support for Nat event logs ( example postNATSourceIPv4Address ) ? #87

Open
shafiev opened this issue Dec 18, 2022 · 7 comments
Assignees

Comments

@shafiev
Copy link

shafiev commented Dec 18, 2022

Hello to all, Is there way to support in web interface a NSEL( NAT event logs { netflow fields like postNATSourceIPv4Address } ) ?

@naim-shafiyev-m10
Copy link

@Dona21 like this


nfdump -r /var/cache/nfdump/nfcapd.202302011250 'host 91.229.90.xx' 
Event time               Event  XEvent Proto      Src IP Addr:Port          Dst IP Addr:Port     X-Src IP Addr:Port        X-Dst IP Addr:Port   In Byte Out Byte
2023-02-01 12:52:15.818  UNKNOW  Ignore TCP        172.16.2.39:34168 ->    91.229.90.xx:80     185.233.182.yy:34168 ->    91.229.90.xx:80           0        0

@WimRooseUG
Copy link

@shafiev No there is not at this moment. We also need support for this. I looked into it, and main show stopper here is mainly nfdump itself. It's easy to define custom formats via de -o fmt option, but the output is not really structured data, hence not easy to implement a general parser in nfsen-ng that would cover all use cases. Nfdump offers csv and json output, but the fields included are hardcoded, and NSEL fields are currently not included sadly - at least not in csv, and nfdump 1.7 doesn't include them in the json output neither, even when compiled with NSEL support (although that might be a bug).

It's also possible to define formats in a nfdump.conf file, and let nfdump output comma separated data, but the field codes are not included, so nfsen-ng still needs some hacking to make it work - and then again, for this single use case only.

See #31 also

@mbolli what's your opinion about this?

@mbolli
Copy link
Owner

mbolli commented Mar 23, 2023

@WimRooseUG as long as there is no built-in support in nfdump, I'd like to leave it as it is. PRs with an elegant solution welcome though.

@WimRooseUG
Copy link

@mbolli I have been working on it this week, and with some minor changes it's possible to show nsel fields in the web UI, but it's mainly a hack, not really something we could call an elegant solution. I'll dig into the nfdump issues further, and will file a new one regarding the missing nsel fields in the json output of nfdump 1.7. I agree that first nfdump needs some enhancements in its output behavior before implementing fixes in nfsen-ng.

@mbolli
Copy link
Owner

mbolli commented Mar 23, 2023

@WimRooseUG you could create a draft PR, maybe someone else has some insight/ideas.

@WimRooseUG
Copy link

WimRooseUG commented Mar 30, 2023

@mbolli I can confirm nfdump 1.7 json output does include NSEL fields by default - provided that nfcapd files are in the new format. So moving to json output as default will automatically provide support for NAT event logs.

CSV output option is deprecated anyway (nfdump 1.7). From man nfdump

json       Print full record as a separate json object.
csv        Legacy .csv format - will get removed in future releases. Please use json instead.
pipe       Legacy '|' separated format - will get removed in future releases. Please use json instead.

@Igs2000
Copy link

Igs2000 commented Jul 6, 2023

is there a way to automatically recycle the data in the nfsen-ng like the nfsen does? like the $low_water = 90 option

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

No branches or pull requests

6 participants