Opened 11 years ago

Last modified 3 years 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 by Victor Julien, 11 years ago

Component: suitevuurmuur-conf
Status: newassigned

in reply to:  description comment:2 by Fred Leeflang, 11 years ago

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 by Fred Leeflang, 11 years ago

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 by Fred Leeflang, 11 years ago

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 by Fred Leeflang, 11 years ago

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

comment:6 by Fred Leeflang, 11 years ago

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 by Victor Julien, 3 years ago

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