The Auto-Response facility (in all console servers with Firmware V3.5.1 and later) uses Check Conditions to trigger action sequences. Included is a Custom Check which allows uses to run a nominated custom script executable (with nominated arguments) whose return value is used as the trigger event. The script executable can be used to monitor nominated ports/ device status, or to probe the state of software applications or services running on other computers and appliance at the site:
- Click on Custom Check as the Check Condition
- Create an executable trigger check script file (e.g. the file below named /etc/config/test.sh )
#!/bin/sh
logger "A test script"
logger Argument1 = $1
logger Argument2 = $2
logger Argument3 = $3
logger Argument4 = $4
if [ -f /etc/config/customscript.0 ]; then
rm /etc/config/customscript.0
exit 7
fi
touch /etc/config/customscript.0
exit 1
- Enter the Script Executable file name (i.e. /etc/config/test.sh). For other examples of custom script executables referfaq417-More-Custom-Script-Checks
- Set the Check Frequency (i.e. the time in seconds between re-running the script) and the Script Timeout (i.e. the maximum run-time for the script)
- Specify the Successful Return Code. An Auto-Response is triggered if the return code from the script is not this value
- Enter Arguments that are to be passed to the script (e.g. with a web page html check script, these Arguments might specify the web page address/DNS and user logins)
- Check Save Auto-Response
Note: For general info on monitoring, auto-response (and alert config pre V3.5.1) refer faq409-Auto-Response-Alerts
Comments
0 comments
Article is closed for comments.