How Compound Rules Are Evaluated
A compound rule may be created as a threshold, event, or KPI rule type. However, irrespective of rule type, a compound rule is evaluated, to determine whether it is true or false, only when all of the sub-expressions have non-null data. This data may be new values/events/readings for the most recent collection interval or stored data from a previous collection interval if no data is collected for the current interval. After a compound rule is successfully evaluated, the sub-expressions are reset and the compound expression again waits for all sub-expressions to receive new data. In addition, compound rules only retain the last sub-expression data readings; whenever a reading is received, all previous readings are discarded.
The following example illustrates how all compound rules are evaluated. In this example, the compound rule is configured to fire when the value for KPI #1 is greater than 50 and the value for KPI #2 is greater than 500. The KPI collection interval for KPI #1 is 1-minute and the KPI collection interval for KPI #2 is 1-hour.
The following table demonstrates the calculation of the KPI readings.
| KPI #1 | KPI #2 |
| 50 | N/A |
10:55 AM | 80 | N/A |
10:56 AM | 60 | N/A |
10:57 AM | 30 | N/A |
10:58 AM | 20 | N/A |
10:59 AM | null | N/A |
11:00 AM | null | 555 |
In this example, the compound rule would be evaluated at 11:00 AM, since this is when both sub-expression KPIs have non-null readings. This evaluation would occur based on a reading of 20 from 10:58 AM for KPI #1, and a reading of 555 at 11:00 AM for KPI #2. Please note that although KPI #1 had two readings greater than 50 prior to 11:00 AM, the compound rule would not fire at 11:00 AM, because only the last readings are retained for evaluation. Therefore the rule would evaluate at 11:00 AM as false.
As the preceding example illustrates, the KPI collection interval is not considered when a compound rule is evaluated. The evaluation of the compound rule simply occurs whenever both sub-expression readings can be evaluated. In the preceding example, the evaluation of the compound rule occurs at 11:00 AM; however, if there is no reading for KPI #2 until 12:00 noon, 8:00 PM, the next day, or even three days or three weeks later, the rule will not be evaluated until that time. Additionally, the last KPI reading for each KPI is used in the evaluation. In other words, the reading value of 30 is used for KPI #1 in the example above, over-riding all reading values prior to when the reading occurs for KPI #2.
After a compound rule is evaluated, the sub-expressions are reset and again wait for new readings. Therefore, KPI #1 will continue to receive new on minutes readings, but the compound expression will not be evaluated until KPI #2 receives a new reading at the next hour.
Given the considerations involving compound rules, the recommended scenario for using them is to ensure that all of the sub-expressions comprising the compound rule are evaluated regularly and frequently. In the case of compound KPI rules, a common KPI collection interval for all sub-expressions, where each KPI is evaluated for every collection interval, would provide the most intuitive results.