doc/developers/README.recording.md
Working on traffic recording in ntopng can be tricky when it comes to debugging or adding new features.
This is because Continuous Recording requires ntopng to run as a systemd service.
In this mode, ntopng automatically configures and starts an n2disk (specifically, n2disk-ntopng)
service with a service dependency. As a result, the n2disk service may continuously restart during
testing, making debugging difficult.
To simplify development and debugging, it is recommended to run ntopng manually (in the foreground) while having access to Pro Lua scripts (otherwise compressed when running as a service) and traffic recording. This can be achieved by configuring an external Traffic Recording Provider, which removes the service dependency and allows n2disk to run independently as a service.
Example configuration file /etc/n2disk/n2disk-eno1.conf:
--interface=eno1
--dump-directory=/storage/n2disk/eno1/pcap
--timeline-dir=/storage/n2disk/eno1/timeline
--disk-limit=10%
--max-file-len=256
--buffer-len=1024
--index
--writer-cpu-affinity=0
--reader-cpu-affinity=1
--indexer-cpu-affinity=2
Always verify that the n2disk configuration matches your capture environment (interfaces, directories, disk limits).
sudo systemctl restart n2disk@eno1
With n2disk running as a service, configure ntopng to use it as external provider.
In this setup:
Traffic Recording Provider configuration under Interface Details Settings:
The n2disk status should be now reported in the recording section:
Extraction should become available from pages including the historical chart: