[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CHECK FILE with script to determine filepath
From: |
SZÉPE Viktor |
Subject: |
Re: CHECK FILE with script to determine filepath |
Date: |
Wed, 12 Dec 2018 23:27:10 +0100 |
User-agent: |
Horde Application Framework 5 |
Idézem/Quoting Marc Rossi <address@hidden>:
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
You may monitor a shell script's output that does regexp matching.
See *_script files in
https://github.com/szepeviktor/debian-server-tools/tree/master/monitoring/monit/services
SZÉPE Viktor, honlap üzemeltetés / Running your application
https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md
--
ügyelet/hotline: +36-20-4242498 address@hidden skype: szepe.viktor
Budapest, III. kerület