CHECK FILE with script to determine filepath

Marc Rossi <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <CAMJu8UbhKFvVBkNdrGjAtnDP6f3zo6JSvFx94gY3C1JL1OOX0g@mail.gmail.com>
Have an app that like many other apps has a timestamp in the filename.
Would like to monitor this logfile without having to create a symlink.

Something like below.

check file foo.log
    with path `ls -rt /var/log/foo*| tail -n1`
    if content = "ERROR" then alert

Anyone have a solution for this given I don't believe it is supported by
monit.

TIA.

-- 
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.