Skip to content

Enable sockets and stdin log sources to announce import progress

Leandro Santiago requested to merge feature/import_for_other_readers into develop

Somehow Ref #160 (closed)

How to test it:

Make a release version:

make release

Then start controlcenter with -logs_socket unix=/tmp/socket.sock -workspace /tmp/some-new-workspace

You'll see in the web ui that the "generating insights" progress is stopped. It's waiting for logs to arrive.

Then, in another terminal, send the logs to the socket (You'll need opsnbsd-netcar for it. Apparently the GNU version does not support communicating with unix domain sockets):

$ nc -U /tmp/socket.sock < /var/log/mail.log

Controlcenter should immediately start importing the logs, and the progress should move accordingly.

IMPORTANT: If the log file provided starts with a date more recent than the current moment (for instance, if I use logs from september last year now in march, september looks after march), you'll need to specify manually the year for the file with the command line option -log_starting_year 2019, for instance.

Edited by Leandro Santiago

Merge request reports