FTR--want an alarm to fire if our FTR script doesn't run or gets an error.
Even if the script is reporting a failure/error it is still considered to have run and we will get some type of results ("red bars" in the Intelligent Agent) .
For a scheduled script that is is failing to run at all or crashing ( "white bars" in the Intelligent Agent), FTR will have no results whatsoever. Most rules would not detect that situation since no results would ever be sent to the FMS. In other words, when a white bar is displayed in the Intelligent Agent there is no data sent to foglight from the FTR agent so most rules wouldn't run.
This is something that should never occur. If it is, the correct response is to find out why your script is crashing some of the time and fix it.
However, as a backup, here is a script you can use to create a rule (named FTRResultDerekAug16--see the attatched screenshots) that will trigger an alarm if an FTR script doesn't run or crashes. This Rule Defintion needs to be 'Time Driven', not the default 'Data Driven'. Also, the 'Enable Trigger without Data' checkbox must be checked.
The scope type for this rule would be an FTRResult. What it does is calculate when we expect a result for this script based on the last time it sent results. It ends up with a variable called lateInMins that contains the number of minutes past when we expected the script to run again. As long as this value is negative we are in good shape and returns false for setting an alarm. In this example if the minutes late value is greater than 10 minutes then we return true. You can fine tune that value to your preference. You may also need to adjust the rule’s scope setting to only apply to specific FTR scripts based on your needs.
ds = server['DataService'];
ov = ds.retrieveLatestValue( scope, 'responseTime');
nextExpectedValueTime = ov.getPeriodEnd() + ov.getSampledPeriod();
now = Calendar.getInstance().getTimeInMillis();
lateInMins = (now - nextExpectedValueTime)/60000;
if(lateInMins.intValue() > 10)