Skip to main content

Alert Definitions

Health Monitoring is driven through the configuration of Alerts. Each Alert monitors a metric that is measured at regular intervals with the Condition script being evaluated each interval and triggering Alert Notifications if appropriate. image-20250403-181305.png Each Alert Definition consists of:
  • Active - Whether the alert is active or inactive. Inactive Alerts will still be displayed in the table but will not monitor or send any notifications.
  • Metric - The specific metric that will be monitored in this Alert. See below for a complete list of metrics.
  • Condition - Each metric will produce a unique set of results during a monitoring window. The Condition script can evaluate these results via the results variable and return true if an alert should be triggered. The script can also return a text value or string, which will trigger an alert with the text value in the alert message. See Editing Alerts below for a more in depth look at the Condition script.
  • User Recipients - Specific Users that notification alerts should be sent to.
  • Group Recipients - Specific FlexDeploy Groups that notification alerts should be sent to.

Adding Alerts

To add a new Alert, simply click the (blue star) ADD ALERT button. image-20250403-184258.png This will insert a new row into the table where it can be configured. image-20250403-184332.png After entering all required values, denoted by the * in the column headers, click the save :save: button.

Alert Templates

Several Alert Templates are available that provide quick configuration for common scenarios in Alert monitoring. To select a template click the (blue star) ADD TEMPLATE ALERT button. image-20250404-133756.png Each template provides any number of inputs that need to be specified. After confirming your inputs, click the ADD button. The template alert will automatically create an Alert Definition with the metric and condition script pre-populated. Simply add your recipients and save :save: the Alert.

Editing Alerts

To edit an existing Alert, click the edit :Pencil_Edit: button or right click and select Edit from the context menu. This will enable the row for editing. image-20250404-134905.png Make any necessary changes to the Alert and click the save :save: button when finished.

Editing the Alert Condition

The Alert Condition script should return 1 of 3 things:
  • return true - Triggers an alert notification. The notification by default will display the results found during the monitoring period
  • return false - Does not trigger an alert
  • return "More Details" - Triggers an alert with a custom message “More Details”. The results during the monitoring period will still be included in the notification.
There are several variables available that can be used by the Condition script to determine if an alert should be triggered:

Variable

Description

results

The object containing the results measured during the monitoring window. Each results object contains results.getMeasuredAt() which returns a datetime when the measurement occurred. Apart from getMeasuredAt each results object contains different information depending upon the Metric being measured.

previousResults

An identical object to the results object but contains results for the previous measuring window.

previousResults is wrapped in an Optional object as it may not be present during the first monitoring window.

Accessing previousResults should be done like the following:

if(previousResults.isPresent())
{
previousResults.get().getMeasuredAt()
}

Or alternatively

if(!previousResults.isPresent()) return false
def previous = previousResults.get()
// previous can now be access safely and freely just like results

MONITORING

A helper library that provides any common functions for use within Condition scripts.

Keep in mind that adding an Alert from a template can be used as a starting point. The template will generate a sensible default Condition script that can be modified as needed.

Deleting Alerts

To delete an Alert, click the delete :delete: button. This cannot be undone, if you would only like to temporarily stop Alert notifications, consider inactivating the Alert instead. image-20250404-150633.png

Configuration and Metrics

Each Alert is monitoring a specific “Metric” that is measured at regular intervals. This interval is customizable by Metric on the Configuration tab. image-20250404-150904.png
Metric intervals can only be in increments of 5 minutes, for example 5, 10, 15 etc.

Customizing Notifications

Each Alert will trigger a notification when the Condition script returns 1 of the following 2 values
  • return true
  • return "some custom message"
Each notification will be default include a table of the metric results during the measuring window. An example can be seen below for the High CPU Time Alert template. image-20250404-151715.png Notifications can be customized by changing the text/string return value in the Condition script or by creating a custom Notification Template for the Health Metric Alert event. See Notification Templates for more information.