Event Orchestration Cache Variables
Event Orchestration Cache Variables allow you to store event information once events are converted into alerts or incidents. You can then use this stored information in Event Orchestration rules for setting conditions or triggering actions. Using cache variables in this way helps manage scenarios where understanding a system's status, event patterns, or timing is critical for diagnosing issues.
There are two ways to store data in variables. Both variable types populate whenever an event matches the conditions assigned to a cache variable:
- Recent event values: Assign data from an event to a cache variable.
- Count of events: Number of occurrences of events matching the cache variable’s condition.
Cache Variables vs. Rule Variables
Unlike Rule Variables, which are limited to use within a single rule, cache variables can be applied throughout the entire orchestration. For more information on Rule Variables, please refer to our Event Orchestration article.
Tip
Configuring cache variable conditions is an identical process to setting Event Orchestration rule conditions.
Configure Event Orchestration Cache Variables
Cache Variable Usage Limited to Orchestration of Origin
Cache variables can be set in both Global and Service Orchestrations, but they are only usable within the orchestration in which they were created.
Step 1: View Cache Variables
You can access Event Orchestration cache variables from either the Global Event Orchestration or Service Event Orchestration builders.
To view cache variables:
- In the web app, navigate to AIOps Event Orchestration select an Orchestration then select your desired Global Orchestration or Service Orchestration.
- Click View Cache Variables in the bottom left. This will expand the Cache Variables pane.
- Any existing cache variables will display in this view. If no cache variables exist yet, you will be able to review some information about creating your first cache variable.

Event Orchestration Cache Variables
Step 2: Create a New Cache Variable
To create a new cache variable:
- Click + Variable to open the cache variable creator modal.
- Define the conditions that will determine when a cache variable populates with data:
- Variable Type: Select a variable type from the dropdown. This defines what data populates into a cache variable. There are four options for cache variable type, and you can only select one at a time for each cache variable. Choose one of the following options and fill in the required fields:
- Event Data (CEF): Stores CEF data associated with an event in the cache variable. Note: If Event Orchestration has altered an event’s data prior to cache variable population, the altered data will be stored in the cache variable.
- Raw Data: Allows you to target information in an event’s raw payload for storage.
- Event Count: Tracks the number of times an event matching the specified cache variable conditions has occurred.
- External Data (API / Manual input): Allows you to leverage data from external sources to add additional context to orchestration rules.
- Choose a Data Format to set what type of data (Text String, Number, or Boolean) can be stored in the variable. Please view the table in the Product Limits section for limit information.
- Enter your desired Data Retention timeframe (in seconds) to set the Time To Live (TTL) for how long the data will be stored for. The TTL timer resets upon each cache variable value update. The configured TTL sets when the data loads and cannot be retroactively changed for existing data. If you update the TTL, it will apply after the next cache variable value update.
- Variable Type: Select a variable type from the dropdown. This defines what data populates into a cache variable. There are four options for cache variable type, and you can only select one at a time for each cache variable. Choose one of the following options and fill in the required fields:
- Variable Name: Enter a variable name. This is the display name that will appear in Event Orchestration rules and actions.
- You may optionally add further conditions by clicking + New Condition. Note: Creating conditions for cache variables follows the same process as creating routing rules for Event Orchestration.
- When you are finished, click Save.
Step 3: Use Your Cache Variable
You can use cache variables in either Event Orchestration rule conditions or actions.
Cache Variable Duration
Stored values last for 24 hours, or until they're replaced by a new value. When a new value is set, the 24-hour countdown starts again.
Use a Cache Variable in a Condition
- Click + New Rule, + Else Rule or Nest Rule to add a new rule, or click to edit an existing rule in an Event Orchestration that contains cache variables.
- Select If events match certain conditions from the condition type dropdown.
- Assign the cache variable to either the target (e.g.,
event.summary
) or value (i.e., the value being compared to whatever data is stored in the target) portion of the condition:- To assign a cache variable to the target portion of an Event Orchestration condition, click the left cell that shows event and select Cache Variable from the dropdown. This will populate the cell with
cache_var.
, which is how Event Orchestration references cache variables. Then type the cache variable name you wish to use after the period in the same cell (e.g.,cache_var.server_status
). Once complete, enter your preferred value in the right cell. - To assign a cache variable to the value portion of an Event Orchestration condition, select your preferred target from the right cell and then click into the blank right cell in the condition builder. Type the name of the cache variable you want to reference using the following syntax:
cache_var.your_variable_name
.
- To assign a cache variable to the target portion of an Event Orchestration condition, click the left cell that shows event and select Cache Variable from the dropdown. This will populate the cell with

Event Orchestration target

Event Orchestration value
Tip
Using a cache variable in the target portion of a condition means a rule will evaluate
true
orfalse
without referencing the data in an event when an event is ingested. This allows you to create a logic gate that activates different branches of an Event Orchestration depending on what data is in a cache variable (e.g.,maintenance_window
,server_status
,deployment_status
, etc.).
Use a Cache Variable in an Action
- Navigate to the action you wish to reference the cache variable in. Supported actions are:
- Add the cache variable to the action using the following syntax:
{{cache_var.your_variable_name}}
. - Click Save.
Edit Event Orchestration Cache Variables
- In the web app, navigate to AIOps Event Orchestration select an Orchestration and then select your desired Global Orchestration or Service Orchestration.
- Click View Cache Variables in the bottom left to expand the Cache Variables pane.
- To the right of your desired cache variable, select Edit configuration.
- Make your desired changes to the cache variable's condition(s) and properties and click Save.
Disable or Delete Event Orchestration Cache Variables
Disabled and Deleted Cache Variables
Please be advised that disabling or deleting a cache variable may lead to unexpected behavior if there are any rules that still reference it. When you disable or delete a cache variable, it evaluates as
NULL
. For example, say you create a cache variablehost
and use it in a rule:cache_var.host
matchesevent.host
. After disabling or deletinghost
, the rule would evaluate toNULL
matchesevent.host
.As a best practice, please update your Event Orchestration rules before disabling or deleting a cache variable.
Disable an Event Orchestration Cache Variable
- In the web app, navigate to AIOps Event Orchestration select an Orchestration and then select your desired Global Orchestration or Service Orchestration.
- Click View Cache Variables in the bottom-left to expand the Cache Variables pane.
- To the right of your desired cache variable, select Disable.
- In the confirmation modal, click Disable.
To re-enable a cache variable, select Enable.
Delete an Event Orchestration Cache Variable
Deletion is Permanent
This action cannot be undone, and deleted cache variables cannot be recovered.
- In the web app, navigate to AIOps Event Orchestration select an Orchestration and then select your desired Global Orchestration or Service Orchestration.
- Click View Cache Variables in the bottom-left to expand the Cache Variables pane.
- To the right of your desired cache variable, select Delete.
- In the confirmation modal, click Delete.
Product Limits
Cache Variables per Orchestration
- Each Global Orchestration can have 100 cache variables.
- Each Service Event Orchestration can have 100 cache variables.
- We do not support Cache variables for Service Routes.
Cache Variable Content
Cache Variable Type | Data Format | Limitations |
---|---|---|
Event Data (CEF) | String | Maximum of 1024 characters |
Raw Data | String | Maximum of 1024 characters |
Event Count | Integer | Maximum value of 1000 DISCLAIMER: A condition referencing a cache variable compared to a value that exceeds the limit of 1000 may lead to unexpected behavior. |
Cache Variable Accuracy
Cache variables will process in order in a best-effort manner. Although it is expected that updates to the variables will be handled in FIFO order, this cannot be guaranteed when multiple updates occur in less than 1 second.
FAQ
Can you use a cache variable created in a Global Orchestration as part of a Service Orchestration?
No. You can only reference cache variables in the Event Orchestration they were created for. For example, if you'd like to pass data from a Global Orchestration to a Service Orchestration, consider using a custom_details
Event Field. Please read Event Fields for more information.
Can you view historical values for a cache variable?
We do not currently support viewing historical cache variables, however this functionality is on our roadmap.
What happens if a cache variable value exceeds 1024 characters?
Cache variable data will truncate to fit the 1024 character limit.
Can non-string types be converted to strings?
Cache variables use PagerDuty Condition Language (PCL), identical to Event Orchestration rules, and will attempt to interpret data in its correct format. If that process fails, it will interpret data as a string.
What is the maximum value an Event Count variable can be?
There is no maximum value for an event count variable. The maximum time range for an event count variable is 24 hours.
What happens if two cache variables in the same Event Orchestration have the same name?
It is not possible to create two cache variables with the same name in the same Event Orchestration. If you attempt to do this, you will receive an error message.
How can I tell what the current value of a cache variable is?
Our roadmap includes plans to add functionality to display current cache variable value in the cache variables drawer portion of the Event Orchestration UI. This functionality is not currently available. However, users can leverage the variables API to get the current value of a cache variable.
Is the Event Orchestration Cache Variables API supported?
Yes, there is API support for cache variables. In addition, support for cache variables with Terraform is on our roadmap.
Updated 3 days ago