--- title: Create a MetricBase linear predictor trigger description: Create a MetricBase linear predictor trigger to detect when a metric is likely to cross a specified threshold within a specified period of time. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/servicenow-platform/metricbase/create-mb-linear-predictor-trigger.html release: australia product: MetricBase classification: metricbase topic_type: task last_updated: "2026-03-12" reading_time_minutes: 4 breadcrumb: [Trigger flows, MetricBase, Manage instance data sources, Extend ServiceNow AI Platform capabilities] --- # Create a MetricBase linear predictor trigger Create a MetricBase linear predictor trigger to detect when a metric is likely to cross a specified threshold within a specified period of time. ## Before you begin Role required: admin ## About this task The linear predictor trigger uses past data to generate a line that predicts future values. When MetricBase predicts that the linear value reaches a threshold, the trigger executes. \[Omitted image "linear-predictor-trigger.png"\] Alt text: Linear predictor crosses the threshold. If the most recent data point reaches the threshold, the trigger executes regardless of the linear prediction. Trigger parameters include how much past data to use in the calculation of the prediction, how far ahead to look, and the level of confidence that you accept. ## Procedure 1. Navigate to **All** > **MetricBase** > **MetricBase Triggers** > **Trigger Definitions**. 2. Select **New**. 3. On the **MetricBase** Trigger Creation form, select the **Linear Predictor Trigger** option. 4. On the form, fill in the fields. The trigger levels are not initially visible on this form. You configure the levels later.
| Field | Description |
|---|---|
| Name | Name of the linear predictor trigger. |
| Table name | Table in the MetricBase database that contains the metric that you want to monitor. The only tables that appear when you click the search icon are the tables that you specified in the time-series metrics. If you select a metric before you select a table, only tables that have that metric appear in the **Table name** dialog box. |
| Metric | Table metric that you want to monitor that is specified by the **Table name**. The only metrics that appear when you click the search icon are the metrics in that table. If you select a metric before you specify a **Table name**, the metrics in all your time-series metrics appear. After you select a metric, only the tables that contain that metric appear when you click the search icon that is next to the **Table name**. |
| Active | Option to activate the trigger. |
| Window | Length of time used to calculate the line that predicts the future course of the value. For example, you might want to use the last 10 minutes of data to calculate the linear predictor. If the value is too long, the line does not reflect current trends. If the value is too short, the line might follow the raw values too closely and not accurately reflect the overall trend of the values. The value must be at least 10 times the sampling period that is defined by the sampling rate of your **Metric**. **Warning:** Do not confuse this value with the **Window** value in the [trigger level](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/metricbase/create-mb-linear-predictor-trigger.md). That value specifies how far into the future that you want the linear predictor to look to see if the **Metric** is likely to cross the **Threshold**. |
| Confidence Level \(%\) | A measure of how closely the real data fits the linear prediction of the data. A confidence level of 95% means that the real value must be within 5% of the predicted value to execute a trigger. If you only want to trigger when the real values are close to the predicted values, choose a high confidence percentage. If you are willing to accept real data that varies more significantly from the predicted values as being valid, select a lower confidence level, for example, 80%. |
| Trend | Direction of the trend: upward or downward. For example, the value is increasing or decreasing toward the **Threshold**. |
| Threshold | Target value that the metric is expected to reach before the trigger executes. |
| Description | Description of the trigger. |
| Field | Description |
|---|---|
| Level | Numbers that indicate increasing severity. Each level should trigger a different flow. For example, you might define the following:- **Level 1** Battery is predicted to reach 20% in 30 minutes. - **Level 2** Battery is predicted to reach 20% in 5 minutes. **Level** is often used in Condition Scripts. See [Execute triggers conditionally](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/metricbase/create-action-condition.md). |
| Function | Comparative function to use on the threshold value. **Less than or is** is the only available option. For example, battery life **Less than or is** 30 minutes. |
| Window | How far into the future that you want the linear predictor to look to see if the metric is predicted to cross the threshold. **Warning:** Do not confuse this value with the **Window** value in the [trigger definition form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/metricbase/create-mb-linear-predictor-trigger.md). That value specifies how much data to use \(measured in time\) to calculate the slope of the predictor line. |