Windows sensu-client logs

The sensu-client logs on Linux have logrotate support and work fine.

On windows though the specified logfile in the sensu client xml logs to the one file.

This is ok, except external programs cant rotate the log file because the file is locked.

I tried using nxlog to rotate the file but obviously it complains that its in use by another process.

Is there any way to handle this other than having to stop/start sensu-client?

If the option is ommitted from the xml sensu-client just logs to sensu-client.out.log in the bin folder anyway which pretty much poses the same issue where it continues to grow indefinetly.

Apache deals with this by logging to a pipe to rotatelogs.exe (see http://theheat.dk/blog/?p=1353 )

Would this work in this instance?

Cheers,

Joel

···

On Wednesday, 24 August 2016 02:53:39 UTC+1, hashi wrote:

The sensu-client logs on Linux have logrotate support and work fine.

On windows though the specified logfile in the sensu client xml logs to the one file.

This is ok, except external programs cant rotate the log file because the file is locked.

I tried using nxlog to rotate the file but obviously it complains that its in use by another process.

Is there any way to handle this other than having to stop/start sensu-client?

If the option is ommitted from the xml sensu-client just logs to sensu-client.out.log in the bin folder anyway which pretty much poses the same issue where it continues to grow indefinetly.

This would require sensu to be able to log to a pipe and be configured to send the logs to the stdin of rotatelogs.

Anyone know if this would work? We’ve just hit this as an issue as well - just as well Sensu is monitoring the diskspace :slight_smile:

···

On Wednesday, 24 August 2016 15:51:35 UTC+1, joel....@hscic.gov.uk wrote:

Apache deals with this by logging to a pipe to rotatelogs.exe (see http://theheat.dk/blog/?p=1353 )

Would this work in this instance?

Cheers,

Joel

On Wednesday, 24 August 2016 02:53:39 UTC+1, hashi wrote:

The sensu-client logs on Linux have logrotate support and work fine.

On windows though the specified logfile in the sensu client xml logs to the one file.

This is ok, except external programs cant rotate the log file because the file is locked.

I tried using nxlog to rotate the file but obviously it complains that its in use by another process.

Is there any way to handle this other than having to stop/start sensu-client?

If the option is ommitted from the xml sensu-client just logs to sensu-client.out.log in the bin folder anyway which pretty much poses the same issue where it continues to grow indefinetly.