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

[dev.icinga.com #8868] logrotate does not work #2827

Closed
icinga-migration opened this issue Mar 26, 2015 · 11 comments
Closed

[dev.icinga.com #8868] logrotate does not work #2827

icinga-migration opened this issue Mar 26, 2015 · 11 comments
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/8868

Created by nielsk on 2015-03-26 07:58:58 +00:00

Assignee: nielsk
Status: Resolved (closed on 2015-04-20 08:11:28 +00:00)
Target Version: 2.3.4
Last Update: 2015-04-20 08:11:28 +00:00 (in Redmine)

Icinga Version: 2.3.2
Backport?: Already backported
Include in Changelog: 0

Logrotate throws the following error:
2212 error: error setting owner of /var/log/icinga2/icinga2.log-20150326 to uid 998 and gid 996: Operation not permitted
2213 error: error setting owner of /var/log/icinga2/error.log-20150326 to uid 998 and gid 996: Operation not permitted

And the logs do not get rotated, just 20 Byte-sized gz-files get created

According to the manpage of logrotate copytruncate and create are incompatible. When I remove the copytruncate-dircetive and run logrotate manually with logrotate --force I get the following error:
error: error running non-shared postrotate script for /var/log/icinga2/icinga2.log of '/var/log/icinga2/icinga2.log /var/log/icinga2/debug.log '

But log-files get moved to a file called error.log.1 and icinga2.log.1 but are not getting zipped after running it manually.

My log-files reach back to January.

OS: CentOS Linux release 7.0.1406 (Core)

Attachments

Changesets

2015-03-31 10:18:20 +00:00 by jflach a283695

Fix logrotate configuration

refs #8868 fixes #8808

2015-04-20 06:54:17 +00:00 by jflach 66dd494

Fix logrotate configuration

refs #8868 fixes #8808

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-03-26 16:12:24 +00:00

  • Status changed from New to Feedback
  • Assigned to set to nielsk

Show the permissions of /var/log/icinga2 and below.

@icinga-migration
Copy link
Author

Updated by nielsk on 2015-03-27 12:29:09 +00:00

/var/log/icinga2/: icinga:icingacmd
error.log: icinga:icingacmd
error.log-$DATE.gz: icinga:icinga
icinga2.log: icinga:icingacmd
icinga2.log-$DATE.gz: icinga:icinga

./compat/: icinga:icingacmd
./compat/icinga.log: icinga:icinga

./compat/archives: icinga:icingacmd
./compat/archives/*: icinga:icinga

./crash/: icinga:icinga
./crash/*: icinga:icinga

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-03-31 06:29:31 +00:00

  • Status changed from Feedback to Assigned
  • Assigned to changed from nielsk to jflach
  • Target Version set to 2.4.0

@icinga-migration
Copy link
Author

Updated by jflach on 2015-03-31 10:22:00 +00:00

  • Status changed from Assigned to Feedback

I am not experiencing any problems now, can you confirm this?

@icinga-migration
Copy link
Author

Updated by jflach on 2015-03-31 10:22:33 +00:00

  • Assigned to changed from jflach to nielsk

@icinga-migration
Copy link
Author

Updated by arcade on 2015-03-31 12:06:59 +00:00

  • File added logrotate_icinga2.PNG

I can confirm this, also with Centos 7, my icinga2.log is currently 3GB

@icinga-migration
Copy link
Author

Updated by nielsk on 2015-04-14 06:32:26 +00:00

Sorry, I was on vacation.
The problem still persists; my log grew already to 11GB since my "manual rotate" ca 3 weeks ago.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-04-17 11:41:01 +00:00

Are you able to reproduce this problem with 2.3.3.

@icinga-migration
Copy link
Author

Updated by arcade on 2015-04-17 15:12:12 +00:00

error: error creating output file /var/log/icinga2/icinga2.log-20150117.gz: File exists
error: error setting owner of /var/log/icinga2/error.log-20150417 to uid 997 and gid 995: Operation not permitted
error: stat of /var/log/cron failed: No such file or directory

icinga2 - The Icinga 2 network monitoring daemon (version: v2.3.3)

The logrotation would work if you define a size parameter. And the 'killall' command which is used in the postrotate, isn't installed as a default packages -> needs 'psmisc' packages

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-04-20 08:11:29 +00:00

  • Status changed from Feedback to Resolved
  • Target Version changed from 2.4.0 to 2.3.4
  • Done % changed from 0 to 100
  • Backport? changed from TBD to Yes
  • Include in Changelog changed from 1 to 0

Resolved in #8808.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-06-06 12:47:07 +00:00

  • Relates set to 11855

@icinga-migration icinga-migration added bug Something isn't working area/configuration DSL, parser, compiler, error handling labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.3.4 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant