This issue respects the following points:
Which variant of the Monitoring Plugins do you use?
Bug description
The check/plugin fails to detect new log entries when the log file is rewritten from the beginning rather than having new entries appended to the existing content.
Steps to reproduce - Plugin call
'/usr/lib64/nagios/plugins/logfile' '--alarm-duration' '10' '--critical-regex' 'Das ist ein Fehler' '--filename' '/home/test.log'
Steps to reproduce - Data
- Create the log file /home/test.log
- Add the following line to the log file: 2026-07-08 12:43:44 Das ist ein Fehler
- Run the Icinga check.
- Add the following line to the log file, overwriting the log entry that was added in step 2: 2026-07-08 12:46:25 Das ist ein Fehler
- Run the Icinga check.
- Repeat steps 4 and 5 until the alarm duration specified in the check (--alarm-duration '10') has elapsed. Each time you repeat step 4, update the timestamp at the beginning of the log entry to the current time while keeping the rest of the log message unchanged.
No response
Environment
RHEL 8.10
Plugin Version
logfile: v2026060101 by Linuxfabrik GmbH, Zurich/Switzerland
Python version
Python 3.6.8
List of Python modules
No response
Additional Information
No response
This issue respects the following points:
Which variant of the Monitoring Plugins do you use?
Bug description
The check/plugin fails to detect new log entries when the log file is rewritten from the beginning rather than having new entries appended to the existing content.
Steps to reproduce - Plugin call
'/usr/lib64/nagios/plugins/logfile' '--alarm-duration' '10' '--critical-regex' 'Das ist ein Fehler' '--filename' '/home/test.log'
Steps to reproduce - Data
No response
Environment
RHEL 8.10
Plugin Version
logfile: v2026060101 by Linuxfabrik GmbH, Zurich/Switzerland
Python version
Python 3.6.8
List of Python modules
No response
Additional Information
No response