Skip to content
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

Windows - sensu-client.log does not rotate #618

Closed
dzeleski opened this issue Mar 15, 2017 · 4 comments
Closed

Windows - sensu-client.log does not rotate #618

dzeleski opened this issue Mar 15, 2017 · 4 comments
Assignees

Comments

@dzeleski
Copy link
Contributor

Description of problem

Sensu wrapper service is not configured to rotate logs on windows

Platform and version information

Occurs on Windows Server 2012R2

Info

erb template that causes the issue: https://github.com/sensu/sensu-puppet/blob/master/templates/sensu-client.erb

winsw info around logging: https://github.com/kohsuke/winsw/blob/master/doc/loggingAndErrorReporting.md#rotate-mode

Im thinking we add the following to the erb template, this would keep 10x 10MB log files and delete the oldest.

<log mode="roll-by-size">
      <sizeThreshold>10240</sizeThreshold>
      <keepFiles>10</keepFiles>
</log>
@dzeleski
Copy link
Contributor Author

Adding the logpath option as well:

  <logpath>C:\opt\sensu\</logpath>
  <log mode="roll-by-size">
        <sizeThreshold>10240</sizeThreshold>
        <keepFiles>10</keepFiles>
</log>

Going to let this burn for a few days and we will see what happens.

@jothoma1
Copy link

jothoma1 commented Mar 17, 2017

Hi, can you explain where do you put these options ?
Is it in the xml for creating the sensu service ?

@dzeleski
Copy link
Contributor Author

@jothoma1 sure: C:\opt\sensu\bin\sensu-client.xml is where it gets added. Youll also need to remove the -l option off of the arguements, if you click on the pull request above you can see the changes that were made.

@ghoneycutt ghoneycutt assigned jeffmccune and ghoneycutt and unassigned jeffmccune Jul 4, 2017
@ghoneycutt
Copy link
Collaborator

Thank you @dzeleski for opening this issue and @jothoma1 for your help.

This appears to be solved by PR #621

Please re-open if this is not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants