What would be the easiest way to create an inverted hostalive

I want to be notified when some machines are up, and that state to be considered the error state, essentially I would like !hostalive.

What is the easiest way to do this?

you could write a bash wrapper for check_ping that inverts the exitcode
if exitcode != 0 => exit 0
else exit 1

1 Like