Background:
Nagios Core 4.4.4 compiled from source. No special options, just run ./configure Running in Docker container on Centos 7 host with latest updates.
Issue:
We don't want/need Nagios logs, so we set _logfile parameter to /dev/null
When this is done Nagios starts, however memory size of Nagios process continues to grow indefinitely until all memory on host is exhausted.
If _logfile is set to regular file Nagios works as expected.
How to reproduce:
Configure Nagios with _logfile=/dev/null and execute some checks. Process size will grow. If more checks are scheduled the nagios process will grow more.
What you expect to happen:
By setting _logfile to /dev/null anything recorded to log should be discarded, without causing additional memory usage.
Workaround:
Before starting Nagios, create symlink as follows-
ln -sf /dev/null /usr/local/nagios/var/nagios.log (replace with log_file param), and set _log_rotationmethod to n (otherwise Nagios will rotate the symlink itself, and then continue writing file)
Background: Nagios Core 4.4.4 compiled from source. No special options, just run ./configure Running in Docker container on Centos 7 host with latest updates.
Issue: We don't want/need Nagios logs, so we set _logfile parameter to /dev/null When this is done Nagios starts, however memory size of Nagios process continues to grow indefinitely until all memory on host is exhausted. If _logfile is set to regular file Nagios works as expected.
How to reproduce: Configure Nagios with _logfile=/dev/null and execute some checks. Process size will grow. If more checks are scheduled the nagios process will grow more.
What you expect to happen: By setting _logfile to /dev/null anything recorded to log should be discarded, without causing additional memory usage.
Workaround: Before starting Nagios, create symlink as follows- ln -sf /dev/null /usr/local/nagios/var/nagios.log (replace with log_file param), and set _log_rotationmethod to n (otherwise Nagios will rotate the symlink itself, and then continue writing file)