Opened 10 years ago

Last modified 13 months ago

#72 new enhancement

handle logrotation in logviewer

Reported by: Victor Julien Owned by: Fred Leeflang
Priority: major Milestone: undecided
Component: vuurmuur-conf Version:
Keywords: Cc: Fred Leeflang

Description (last modified by Victor Julien)

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 (7)

comment:1 Changed 10 years ago by Victor Julien

Component: suitevuurmuur-conf
Status: newassigned

comment:2 in reply to:  description Changed 9 years ago by Fred Leeflang

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.

comment:3 Changed 9 years ago by Fred Leeflang

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.

comment:4 Changed 9 years ago by Fred Leeflang

Cc: Fred Leeflang 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

comment:5 Changed 9 years ago by Fred Leeflang

Owner: changed from Victor Julien to Fred Leeflang
Status: assignednew

comment:6 Changed 9 years ago by Fred Leeflang

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.

comment:7 Changed 13 months ago by Victor Julien

Description: modified (diff)
Milestone: 0.9undecided
Note: See TracTickets for help on using tickets.