mbolli / nfsen-ng

Responsive NetFlow visualizer built on top of nfdump tools.
Apache License 2.0
232 stars 44 forks source link

Introduce Processor interface #37

Closed nrensen closed 4 years ago

nrensen commented 4 years ago

This diff introduces a Processor interface in the processor sub-directory and moves nfdump.php into that directory implementing the Processor interface. This supports custom Processor implementations by specifying a processor class in settings (similarly to the way custom databases are supported). NfDump becomes the default processor if no processor is specified.

I use this to allow nfsen-ng to run in a php chroot without direct access to the nfcapd files. The original nfsen supports this. My custom nfdump model (not included here), which is similar to the original nfsen, is to run a separate nfsend daemon and have nfsen-ng communicate via a fifo. This could also work using a socket which would allow nfsen-ng to run on a different host from that where the nfcapd files reside.

mbolli commented 4 years ago

Nice work, thanks!