Mk-job: Alert only if there are multiple alerts?

Hi, I monitor a cron / script (@daily) with mk-job. But now I want to see the alert on the gui only if the job fails more than 3 times (so in this @daily case after 3 days). How to do that with CheckMK, is there a filter or similar I can use?

As far as I know, you cannot.

You can make the notifications to be sent from the third check but the alert will be seen from the first time. The solution is to implement that logic in your script, saving in a file a counter with the number of times it is failing and send the FAIL in case it exceeds the indicated value.

Don’t use mkjob, write to the spool directory from the cronjob. If the filename is prefixed with an integer it is ignored after this time in seconds. So If an hourly cronjob should still be OK after two fails, prefix it with 10800.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.