monitoring-plugins
monitoring-plugins copied to clipboard
logfile: Check does not handle wildcards in filename
Describe the solution you'd like
The check must be able to handle the most common logfile monitoring scenario where the logfile name has a date in its name which is automatically rotated.
At the momento using a fixed filename the check is not usable.
Additional context
No response
Counter question: Why monitoring older (rotated) logfiles? For example /var/log/messages
vs. /var/log/messages-20230501
No it is not for monitoring older files but for files with the current date in the name. So every day the filename changes. My specific use case at the moment is on windows. Example: YYYYMMDD.log
Ok, got it, thank you.
I have seen the same requirement but was lucky and could convince the developer to stop this and rotate the logs. A quick try to use the DSL to construct the current date for the file name failed - maybe possible but I ran out of time.
No it is not for monitoring older files but for files with the current date in the name. So every day the filename changes. My specific use case at the moment is on windows. Example: YYYYMMDD.log
I have the same problem with the daily rotation of laravel. (laravel-YYYY-MM-DD.log) Thanks in advance