How to periodically run SSH commands and trigger AppBeat alert
In AppBeat 1.4.5 we introduced support for running SSH commands where you can trigger monitoring alert by checking result of:
- command exit status code (for example you can simply trigger error if exit status code is not 0)
- checking specific text in standard output (stdout) by running regex expression
- checking specific text in standard error (stderr) by running regex expression
You can add new SSH monitor by clicking “Add new periodic monitor”, enter monitor name and from “Agent type” select “Run Secure Shell (SSH) command”:
On next step enter SSH hostname or server IP address and type command you would like to run (for example script name or cat /proc/uptime, …) and specify server authentication. You can use standard username/password authentication or key based authentication (with private key in OpenSSH format).
After you finished “New periodic check” wizard we will immediately start monitoring your SSH server by running your command and checking for expected result.
Happy monitoring!
p.s. if you don’t have AppBeat account yet, you can create one for free!