We try to implement heartbeat monitoring in log files. I.e. an application is expected to write specific strings regularely into a log file and I want to get an alert if the string is missing for a defined time.
First attempt: define a service using check_logfiles and submit the pattern using option “–criticalpattern”, but negate the pattern. We experienced that we got a lot of false alerts, i.e. an alert was generated, although the pattern was there.
Second attempt: “–criticalpattern” is set to “.*” and then define a “–criticalexception”, which contains the pattern. We are not sure if this could work. Further I do not know the difference between “–criticalexception” & “–okpattern=” and which one could be used in this situation.
Did anybody successfully implemented such monitoring?