116
Chapter 7: Alerts, Automated Response and Logging
7.1.8 Custom Check
ThischeckallowsuserstorunanominatedcustomscriptwithnominatedargumentswhosereturnvalueisusedasanAuto-Response
trigger event:
• ClickonCustomCheckastheCheckCondition
• Createanexecutabletriggercheckscriptlee.g./etc/cong/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
• EntertheScriptExecutablelename(e.g./etc/cong/test.sh)
• SettheCheckFrequency(i.e.thetimeinsecondsbetweenre-runningthescript)andtheScriptTimeout(i.e.the
maximumrun-timeforthescript)
• SpecifytheSuccessfulReturnCode.AnAuto-Responseistriggeredifthereturncodefromthescriptisnotthisvalue
• EnterArgumentsthataretobepassedtothescript(e.g.withawebpagehtmlcheckscript,theseArgumentsmight
specifythewebpageaddress/DNSanduserlogins)
• CheckSaveAuto-Response
7.1.9 SMS Command
AnincomingSMScommandfromanominatedcallercantriggeranAuto-Response:
• ClickonSMSCommandastheCheckCondition
• SpecifywhichPhoneNumber(ininternationalformat)ofthephonesendingtheSMSmessage
• SettheIncomingMessagePattern(PCREregularexpression)tomatchtocreatetriggerevent
Note: The SMS command trigger condition can only be set if there is an external USB cellular modem detected