-
Notifications
You must be signed in to change notification settings - Fork 12
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
.raw files are not closed automatically when using rotation-period #82
Comments
A colleague of mine just informed me that the same problem occurs when compactor is listening to network interfaces, it seems that it is a global misfunctioning |
Hi, Can you provide a little more detail after reading the description below? And if you are using One thing to outline here is that is a 'feature' of the compactor design that the file rotation is not triggered immediately at the
The result is both a delayed file rotation and a file with a collection period of 8 minutes in this case. Note that I thought we had this behaviour described in detail in the documentation but looking through the docs I don't actually see it... We've had discussions with other users over this behaviour but once they understood it they updated their analysis tools to use the actual file duration to calculate packet rates, rather than assume it was always fixed. I wonder if this is what you are seeing or if you have found a different issue? Or perhaps this presents a different operational problem for you? |
Hi, |
It is not a simple extension of current code but I can look at the options in more detail and get back to you next week. The other 'workaround' to consider is sending a 'dummy' DNS packet to trigger the C-DNS file rollover - pollutes your traffic but will do the job..... |
We have considered such workaround, but we'd like not to rely on an external host doing a DNS query to ensure log rotation (and we can't perform the query locally for specific architecture reasons). |
That's what I'm looking at - the slightly trickier part is cleanly passing the event to the threads doing the writing but I think it is doable. And also need to check that the downstream tools can handle an empty file, which this change would make possible. I'll work on this more next week (didn't get enough time this week). As you'll see in the manual a SIGHUP will cause the |
Update: OK - I think I have a way to do this and will try to get a 1.2.2-beta1 release out early next week. |
There is a 1.2.2-beta1 release available now with an additional mechanism that forces a C-DNS file rotation when a SIGUSR1 is received. It is recommended to use either the configuration parameters OR a SIGUSR1 to rotate files as trying to use both with the same rotation period will lead to a race condition that could produce extra files. Please test this and see if it meets your use case. Now I have the mechanism figured out I can look to improve the internal triggering to run off an internal timer in future. |
Thank you so much for your quick reply ,we'll have a look tomorrow and get back to you as soon as possible |
Hi, the functionnality seems to work correctly, thank you very much ! However, as it was only implemented for network interface sniffing, I made a PR to allow this functionnality with dnstap socket, which was our main use case. |
Thanks for the feedback! My apologies - I misread that the issue was with DNSTAP and had that additional change (and the PCAP triggers) queued up for the next release. I've merged your PR and will try to get another package generated on Monday. |
1.2.2-rc1 is now available with the DNSTAP implementation. |
@MiniPierre I plan a 1.2.2 production release next week - if you have any feedback on rc1 please let me know! |
Sorry for the late feedback, we deployed the rc1 version and everything's working as expected ! |
Hi,
I have a problem with compactor not performing the log rotation when configured with the
dnstap-socket
option. The.raw
file will not close until receiving new data, thus hanging the data previously collected. Could you have a look ?The text was updated successfully, but these errors were encountered: