Skip to content

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

@JerGet

Description

@JerGet

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions