NAME - checks Log-entries at given times



checkLogExist should be called frequently in a separate job and checks if defined log entries exist in the defined log files, (hinting that the task was run/started), resp. whether the Logfile exists at all.

Configuration is done in sub-hash $config{checkLookup}, being the same place for the errmailaddress/errmailsubject of error mails being sent in the tasks themselves:

 $config{checkLookup} = {
  <> => {
     errmailaddress => "test\",
     errmailsubject => "testjob failed",
     timeToCheck => "0800",
     freqToCheck => "B",
     logFileToCheck => "test.log",
     logcheck => "started.*"
  <...> => {

The key consists of the scriptname + any additional defined interactive options, which are being passed to the script in an alphabetically sorted manner. For the key is irrelevant as all entries of $config{checkLookup} are worked through.


where should the mail sent to in case of non-existence or an error.


subject-line for error mail, only used for error mail sending in the tasks itself.


all checks earlier than this are ignored


ignore log check except on: ML..Monthend, D..every day, B..Business days, M1..Month-beginning, W{n}..Weekday (n:1=Sunday-7=Saturday)


Where (which logfile) should the job have written into ?


"regex keyword/expression" to compare the rows, if this is missing in the logfile after the current date/timeToCheck then an alarm is sent to the configured errmailaddress


Copyright (c) 2023 Roland Kapl

All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.