Ticket #72 (new enhancement)
handle logrotation in logviewer
| Reported by: | victor | Owned by: | fredl |
|---|---|---|---|
| Priority: | major | Milestone: | 0.9 |
| Component: | vuurmuur-conf | Version: | |
| Keywords: | Cc: | fredl@… |
Description
In the Vuurmuur_conf logviewer the logfiles are 'tailed' and displayed. If the logfile is rotated however, the viewer just stops displaying new lines. This is because the file needs to be reopened.
Add a mechanism to reopen the files from time to time. Probably just after a period of silence. So if there hasn't been a new line for say a minute, close and open the file.
Change History
Changed 17 months ago by victor
- status changed from new to assigned
- component changed from suite to vuurmuur-conf
in reply to: ↑ description Changed 9 months ago by fredl
Replying to victor:
In the Vuurmuur_conf logviewer the logfiles are 'tailed' and displayed. If the logfile is rotated however, the viewer just stops displaying new lines. This is because the file needs to be reopened. Add a mechanism to reopen the files from time to time. Probably just after a period of silence. So if there hasn't been a new line for say a minute, close and open the file.
Maybe it's nicer to have vuurmuur_conf react to signals instead and reopen the file when it gets a -HUP or something. It's very easy to add a post script to the logrotate scripts.
Changed 9 months ago by fredl
Or perhaps an even better way to do this would be by using inotify kernel events (see http://en.wikipedia.org/wiki/Inotify). I'll take a stab at putting it in there.
Changed 9 months ago by fredl
- cc fredl@… added
Victor, could you assign this one to me? Like we talked about on IRC, I've decided trying to take a stab at this. I'm even trying to document my progress at http://wiki.3dn.nl/index.php/Vuurmuur
Changed 9 months ago by fredl
- owner changed from victor to fredl
- status changed from assigned to new
Changed 9 months ago by fredl
This one's pretty silly if you think about it. vuurmuur_conf tails files created by vuurmuur_log. Those files should not be logrotated unexpectedly; if they do get rotated it should be done by our own scripts (scripts/vuurmuur-logrotate). Instead of a postrotate /bin/kill -HUP pidof vuurmuur_log, I'd like to do a postrotate $VUURMUUR_LOCATION/vuurmuur_log -R(estart) and on a restart make vuurmuur_log check if vuurmuur_conf is connected. If it's connected we can tell it through IPC to reload.
