Disk available check
Sometimes it can be useful to monitor if a disk is available or not.
For example if you have a USB drive that must always be connected.
The following script will make a check if a specific drive is available. It uses the command "dir", run by the command prompt, this returns an exit code, depending on if the drive is available or not. This is exactly what the boolean custom check needs. When the drive is disconnected, the command will return a non zero exit code, which tells SysOrb that the check is in a failed state.
Make sure to change the drive letter in the command line (ie. "dir c:" should be changed to "dir s:" if you want to monitor the S drive.
In custom.conf:
[drive_check] command=cmd /c "dir c:" type=boolean timeout=120
Make sure when you set up this check on the SysOrb server, that the "Check false" is set to "Alert" or "Warning", otherwise the check will always succeed.