Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 597018 - app-admin/monit is missing logrotate
Summary: app-admin/monit is missing logrotate
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-13 08:29 UTC by Gerrit Kühn
Modified: 2022-11-01 11:38 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
logrotate config file for monit (monit.logrotate,146 bytes, text/plain)
2016-10-13 08:29 UTC, Gerrit Kühn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerrit Kühn 2016-10-13 08:29:35 UTC
Created attachment 450072 [details]
logrotate config file for monit

Monit can even over short time create large logfiles. It should come with a logrotate config file by default. Attached is an example that could go into files/ to be installed into /etc/logrotate.d/ by the ebuild.
Additionally, here is a diff against the recent ebuild to make it install the new config file:

--- monit-5.19.0.ebuild~	2016-08-08 20:08:53.000000000 +0200
+++ monit-5.19.0.ebuild	2016-10-13 10:26:26.957347719 +0200
@@ -39,6 +39,8 @@
 
 	dodoc README
 
+    insinto /etc/logrotate.d
+    newins "${FILESDIR}"/monit.logrotate monit
 	insinto /etc; insopts -m600; doins monitrc
 	newinitd "${FILESDIR}"/monit.initd-5.0-r1 monit
 	systemd_dounit "${FILESDIR}"/${PN}.service
Comment 1 Gerrit Kühn 2021-04-30 13:42:24 UTC
Is there any reason why this isn't picked up? I still carry this as a local patch for my installations (which is certainly doable, but... why? :-).
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-07-31 00:37:20 UTC
Thanks!
Comment 3 Larry the Git Cow gentoo-dev 2021-07-31 00:50:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36b8e4a67573534eff769d34cf3f989b830c34fb

commit 36b8e4a67573534eff769d34cf3f989b830c34fb
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-07-31 00:39:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-07-31 00:41:52 +0000

    app-admin/monit: install logrotate file
    
    Closes: https://bugs.gentoo.org/597018
    Thanks-to: Gerrit Kühn <gerrit.kuehn@aei.mpg.de>
    Signed-off-by: Sam James <sam@gentoo.org>

 app-admin/monit/files/monit.logrotate                           | 7 +++++++
 app-admin/monit/{monit-5.28.1.ebuild => monit-5.28.1-r1.ebuild} | 3 +++
 2 files changed, 10 insertions(+)
Comment 4 Tomáš Mózes 2021-08-05 09:08:41 UTC
After updating to latest monit I got these emails in my mailbox:

error: stat of /var/log/monit.log failed: No such file or directory
run-parts: /etc/cron.daily/logrotate exited with return code 1

Perhaps we should add "missingok" as I don't have these logs at all.
Comment 5 Andreas Kirsch 2022-11-01 11:38:42 UTC
@Tomáš Mózes

Regarding your comment: Can we open the bug again or should we open a new bug?