It sounds like you are trying to do something that might be better handled in another way. That being said, according to the monit documentation, you should be able to accomplish your goal.
From
https://mmonit.com/monit/documentation/:
General syntax for testing specific value or range:
- IF <TEST> THEN ACTION [ELSE IF SUCCEEDED THEN ACTION]
The selected failure action is evaluated each time the <TEST> condition is true. Success action is optional and executed only when the state changes from failure to success. If success action is not set, Monit will send recovery alert by default.