Monit is a free open source utility for managing and monitoring, processes, files, directories and filesystems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations. (unofficial mirror)
operator is either a "=" for match or "!=" for no-match.
I would be able to use math operator to check for upgrades like
check program updates with path "/usr/bin/awk '/packages to be upgraded/ {print $NF}' /tmp/check-updates" # it prints a number
if content > 5 then alert
I workarounded it with a awk test.
check program updates with path "/usr/bin/awk '/packages to be upgraded/ {v+=$NF}END{print v;if (v>=5) exit 1}' /tmp/check-updates"
if status == 1 then alert
From https://www.mmonit.com/monit/documentation/monit.html#FILE-CONTENT-TEST
I would be able to use math operator to check for upgrades like
I workarounded it with a awk test.