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

The nagflux.log file grows without logrotate and fills the root partition #23

Open
JerGet opened this issue Apr 8, 2021 · 0 comments
Open
Labels
bug Something isn't working

Comments

@JerGet
Copy link

JerGet commented Apr 8, 2021

Description

As it says in the title, the nagflux.log file (in /var/log directory) grows without logrotate and fills the root partition.

The problem is twofold because this file is included in the daily backup which is located in /var/archives and which also fills the root partition.

Diagnostic

All lines of this log file start with date and Debug word like below:

[...]
2021-04-08 05:14:50 Debug: 204 No Content
2021-04-08 05:14:50 Debug: 204 No Content
2021-04-08 05:14:55 Debug: Reading Directory: /var/log/nagios/spool/nagfluxperfdata
2021-04-08 05:15:00 Debug: Reading Directory: /var/log/nagios/spool/nagfluxperfdata
2021-04-08 05:15:00 Debug: Reading file: /var/log/nagios/spool/nagfluxperfdata/1617851699.perfdata.host
2021-04-08 05:15:00 Debug: Reading file: /var/log/nagios/spool/nagfluxperfdata/1617851700.perfdata.service
2021-04-08 05:15:05 Debug: Reading Directory: /var/log/nagios/spool/nagfluxperfdata
[...]

Workaround

EDIT: this logrotate config file doesn't work... ⚠️

I added the nagflux configuration file (in /etc/logrotate.d) with the information below to rotate the log file.

/var/log/nagflux.log {
        daily
        create 0644 root root
        rotate 15
        compress
        delaycompress
        dateext
        missingok
        notifempty
        postrotate
            pkill --ns $$ rsyslog -HUP
        endscript
}
@davoult davoult added the bug Something isn't working label Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants