Advanced
The Advanced alarm rule template provides monitoring capabilities by allowing you to create complex alarm conditions using multiple variables, related entities, and custom expressions.

Configuration
Advanced Rules allow you to define complex alarm logic by combining multiple metrics, properties, related entities, and thresholds using AND/OR conditions. This enables precise monitoring and reduces false positives.
Define Basic Rule Details

Navigate to New Rule>Advanced.
In Rule Name, enter a descriptive name for your advanced rule.
Add a Description to explain the purpose of the rule.
Under Target Entity, select the entity type to monitor.
Click Apply Filters to limit the rule to specific entities based on attributes.
Define Variables
Variables represent the metrics or properties used in rule evaluation.

In the Variables section, click Add Variable.
Choose the variable type: Property, or Metric.
Assign each variable a label. (example, PV1: Property → Overall Status).
(Optional): Select Select Related Entities to define variables. Choose the topology and related entity type.
Configure Rule Expression and Conditions

Under Rule Expression and Conditions, select Expression Builder.
Define one or more Threshold Groups.
Why Use Threshold Groups?
Threshold groups allow you to define multiple independent conditions that can trigger an alarm.
Monitor multiple conditions within a single rule.
Trigger an alarm when any one set of conditions is met.
Assign severity based on the condition that occurs.

How Threshold Groups Work:
All conditions within a group must be met (AND).
Any group can trigger the alarm (OR).
The group that triggers the alarm determines the severity.
Define Threshold Criteria.
Select a variable (PV or RV).
Choose an operator (for example, above, equals, not equals).
Enter the threshold value.
Set the Severity for alarms triggered by this group (for example, Critical).
Select the Window duration (for example, 5 minutes).
Click Save to activate the Advanced Rule.
Configure notifications.
You can set up a notification plan for the alarm rule to notify users when the alarm is triggered.To add users to the notification plan, click the Add box and check the users to be added. You can also use an email distribution list for the notification plan.
Note
Available users are determined by the users listed in the LDAP and User Management sections of the Settings tab.
Choose Action.
You can choose a default action, which might be predefined in your system. Alternatively, you can select actions such as sending notifications through Webex, Teams, Slack, or other integrated platforms.
Save Rule: Once you have configured all the necessary parameters, click "Save" to create your new alarm rule
Note
Make sure the UI property com.vi.ui.property.alarm is set to true for Advanced Rules to function correctly.
Advanced Rule – Supported Scenarios
Advanced rules allow you to create alarms using metrics, properties, and filters for a single entity. The following scenarios are supported when using the Expression Builder.
Single Entity – Single Metric
Create an alarm based on a single metric value.
Entity: ESXHost
Input: CPU Utilization (Metric)
Condition: CPU Utilization > 1
Single Entity – Single Property
Create an alarm based on a property value.
Entity: ESXHost
Input: Overall Status (Property) Condition
Overall Status = Green
Single Entity – Metric and Property
Create an alarm using a combination of a metric and a property.
Entity: ESXHost
Inputs: CPU Utilization, Overall Status
Condition: CPU Utilization > 1 OR Overall Status = Green
Single Entity – Multiple Metrics
Create an alarm using multiple metrics.
Entity: ESXHost Inputs: CPU Utilization, Avg VM CPU Ready % Condition: CPU Utilization > 1 OR Avg VM CPU Ready % > 1
Inputs: CPU Utilization, Avg VM CPU Ready %
Condition: CPU Utilization >1 OR Avg VM CPU Ready >1
Enabling the New Alarms Engine
By default, the new Alarm Engine is enabled and supports both property alarms and advanced alarms.

Enabling the New Alarms Engine to Process Existing Templates
To migrate supported alarm templates from the existing alarms service to the new Alarms Engine, complete the following steps.
Step 1: Enable the New Alarms Engine
Navigate to Settings> Service Management.
Search for Alarm Service and add the following property:
com.vi.alarms.engine.enabled = true
Step 2: Disable Supported Templates in the Existing Alarms Service
To avoid duplicate alarm evaluation, disable the templates that will be processed by the new engine.
In the Alarm Service, set the following property:
com.vi.alarms.disabled.templates = template1, template2
This property specifies the list of alarm templates that should be disabled in the existing alarms service.
Step 3: Enable Template Processing in the New Alarms Engine
Navigate to Settings >Service Management.
Search for Alarms Data Extractor service and set the following property:
alarms.engine.templates.enabled = template1, template2
This property enables the new Alarms Engine to process the specified templates. The list of supported templates is the same as those listed in Step 2.
By default, the new Alarms Engine supports the following templates:
PropertyAlarm - advance
GenericAlarm- advance
Rule Expression and Conditions - Expression Code
Expression Code lets users define custom alarm conditions using variable-based logic. After selecting an entity and defining variables, users enter a conditional expression that evaluates threshold values and returns a severity level such as CRITICAL, WARNING, or INFO.

When to Use Expression Code
Use Expression Code to define alarm logic that requires greater flexibility than the standard expression builder. It supports variable-based conditions (such as PV1 and RV1) and allows multiple checks within a single expression.
Format
The system uses a ternary expression format:
condition ? valueIfTrue : valueIfFalse
Supported operators
Comparison: >, <, >=, <=, ==, !=
Logical: &&, for AND, || for OR
Allowed outputs
Return one of these severity values:
"CRITICAL"
"WARNING"
"INFO"
Example
PV1.value > 95 && RV1.value > 90 ? "CRITICAL" : PV1.value > 85 || RV1.value > 80 ? "WARNING" : "INFO"
This expression returns CRITICAL when both values are above the critical threshold, WARNING when either value crosses the warning threshold, and INFO for all other cases.
Step-by-Step: Building an Expression
Add the required variables, such as PV1 and RV1.
Select Enter Expression Code.
In the input box, write your expression using this pattern:
<variable>.value <operator> <threshold>
Combine multiple conditions using && or ||.
End the expression by returning a severity string: "CRITICAL", "WARNING", or "INFO".
In summary, Expression Code lets you build custom alarm logic by combining variables, operators, and severity outputs in a simple conditional format.