Hi all, I have a worker process that frequently balloons in memory usage ordies, requiring a restart. This happens often enough (and therestarting is reliable enough) that the alert mails are a constantsource of noise, leading to their being tuned out by the team. I would like to achieve the following: 1) If process exceeds 300MB memory for 5 cycles, attempt silent restart2) If the restart fails (so, say, if process doesn't exist for 3+cycles), *then* send a nonexist alert Is this possible? I've tried the following: check worker_process with pidfile /var/run/worker_process.pid start program = "/my/start/script" stop program = "/my/stop/script" if totalmem is greater than 300MB for 5 cycles then restart if does not exist then restart if does not exist for three cycles then alert But it seems you can only have one clause for each type of condition -one of the "if does not exist" clauses will be ignored. Another alternative might be to have two checks on the same process -one to restart, and one to alert - but this seems like a horribleduplication of configuration; surely there's a more elegant solution. If anyone's got any ideas, I'd be very grateful, as would my team andtheir inboxes... :-) Simon -- Simon Coffey Developer, Tribesports [email protected] | 07960 004 857
-- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
