Run a script after a service check


I have a check on my CentOS box that lets me know if YUM has any updates available or not. I would like to automatically run a script or shell command depending on the result of the check. For example:

The service check returns OK if there are no updates, WARNING for non-security updates, and CRITICAL for security updates.

If the check returns OK or WARNING, do nothing. If it returns CRITICAL, run “yum update”.

Is this possible?


check event_handlers in the docs :wink: … dlers.html


I looked, but I didn’t think it was as “smart” (for lack of a better term) as I needed. I’ll look closer.