Creating correlation rules
This feature is part of the Observability Graph. See pricing.
Correlation rules are how you turn separate tools into one connected environment. They tell the observability graph which objects from different data sources are the same thing, which are related, and how.
Rules use the same dialog, with the steps varying by rule type. Most walk through Relationship, Conditions and Preview.
Before you start
Before you start, connect the data sources you want to correlate and allow them to finish indexing, so the preview has objects to match against.
Which rule do I need?
Use a catalog rule
If SquaredUp already maintains a rule for the data sources you've connected, accept it instead of building your own. It's the quickest way to start.
- Navigate to Settings > Correlation and select the Catalog Rules tab.
- Find a rule marked Suggested. The columns show what it connects and how it's labeled.
- Click the Accept rule icon to run it now, or the Reject rule icon to dismiss it.
A rejected rule stays listed in gray, so you can accept it later. Catalog rules can't be edited. To change how one behaves, build your own rule with the same types.
You can also accept catalog rules while a new data source imports. On the Configuring correlation rules step, click Enable on a rule, or Enable all.
Create your own rule
Every rule starts from Settings > Correlation > Add correlation rule. Choose the rule type from the options at the top of the Relationship step. Relate is selected by default. The steps that follow depend on the type you choose, and the panel on the left tracks your progress through them.
Click a circle on the canvas to choose its objects. In the panel that opens, optionally pick a Data source (leave it empty to match across all of them), then select one or more object types in Type.
There's no name field. SquaredUp names the rule automatically when you save it.
Create a merge rule
Use a merge rule when two data sources have indexed the same thing and you want one object instead of two. For example, merge an AWS EC2 instance with the same host as reported by Datadog, so the server appears once, with the details from both.
For differently formatted names, such as web-01 and WEB-01.corp.local, see Match on a reshaped value.
- Navigate to Settings > Correlation and click Add correlation rule.
- Configure the following on the Relationship step:
- Select Merge.
- Click the left-hand circle and select one set of the duplicate objects, then click the right-hand circle and select the other.
- Click Next. There are no labels to enter, because a merge always uses the reserved label
is.
- Configure the following on the Conditions step:
- Select the property of each object that proves the two objects are the same thing. Be stricter than you would be for a relate rule. Matching on a display name alone will merge objects that only happen to share a name. See Define match conditions for how conditions work.
- Optionally, click Add new to create additional conditions. All conditions on a merge rule must match. With two or more conditions, Condition Logic is shown but locked to AND.
- Click Preview.
- On the Preview tab, check that nothing unexpected merges, then click Save and run to create and enable the correlation rule.
A merge changes how objects appear everywhere in SquaredUp, so a wrong match is more disruptive than a wrong relationship.
Create a relate rule
Use a relate rule to connect two objects that stay separate. For example, relate a GitHub repo to the AWS server it's deployed to.
- Navigate to Settings > Correlation and click Add correlation rule.
- Configure the following on the Relationship step:
- Select Relate.
- Click the left-hand circle and select the objects to correlate from, then click the right-hand circle and select the objects to correlate to.
- Click the Add label pill between the circles and configure the following:
- From ➜ To:
Enter a description of the relationship between the selected objects, such asdeployed to. - To ➜ From:
Enter a description for the opposite direction, such ashosts. If left empty, it defaults to the From ➜ To label.
- From ➜ To:
- Click Next.
- Configure the following on the Conditions step:
- Select the property of each object that has to match, such as a name or ID that both objects hold. See Define match conditions for how conditions work.
- Optionally, click Add new to create additional conditions.
- Condition Logic:
Appears only with two or more conditions. Enter the AND/OR logic by row number. For example, enter1 AND 2. - Click Preview.
- On the Preview tab, check the pairs it finds, then click Save and run to create and enable the correlation rule.
Create a group rule
Use a group rule to turn a property value into an object, so a set of objects can be treated as one thing. For example, group every AWS server by its region under a new Region object, so each region becomes one object that contains its servers.
A group rule has no Conditions step, because the property you group by is the condition.
- Navigate to Settings > Correlation and click Add correlation rule.
- Configure the following on the Relationship step:
- Select Group.
- Click the left-hand circle and select the objects to group.
- Click the right-hand circle to define the group object the rule creates. Configure the following fields:
- Type:
Select an existing type or enter a new name for the objects the rule creates, such asRegion. - Property:
Select the property to group by. One object is created for each distinct value that property holds.
- Type:
- Click the Add label pill between the circles and configure the following. They describe how a member relates to its group:
- From ➜ To:
Enter a description of the relationship, such asin region. - To ➜ From:
Enter a description for the opposite direction, such ascontains. If left empty, it defaults to the From ➜ To label.
- From ➜ To:
- Click Preview.
- On the Preview tab, check how many groups the rule creates, then click Save and run to create and enable the correlation rule.
Create a bridge rule
Use a bridge rule when two objects belong together but share no property, and a third object holds the link. For example, connect a user to their team through a membership record that holds both IDs.
- Navigate to Settings > Correlation and click Add correlation rule.
- Configure the following on the Relationship step:
- Select Bridge.
- Click the left-hand circle and select the objects to correlate from, then click the right-hand circle and select the objects to correlate to.
- Click the dashed circle below them to select the object that holds the link, such as a membership or assignment record. Configure the same Data source and Type fields.
- Click the Add label pill between the circles and configure the following. They describe the relationship between the two outer objects, not the bridge:
- From ➜ To:
Enter a description of the relationship, such asmember of. - To ➜ From:
Enter a description for the opposite direction, such ashas member. If left empty, it defaults to the From ➜ To label.
- From ➜ To:
- Click Next.
- Configure the following on the Conditions step, which shows three tables, each named after the two objects it compares:
- In the first table, match a property on the left-hand object against a property on the bridge object, such as
userId. - In the second table, match a property on the bridge object against a property on the right-hand object, such as
teamId. - Optionally, in the third table, add a condition that compares the left-hand and right-hand objects directly. Use it to stop a loose match joining things that should stay apart, such as two identically named records belonging to unrelated accounts.
- Click Preview.
- In the first table, match a property on the left-hand object against a property on the bridge object, such as
- On the Preview tab, check that it connects only the intended objects, then click Save and run to create and enable the correlation rule.
All three tables are combined with AND, so there's no condition logic to write. See Define match conditions for what every rule type shares.
Define match conditions
Merge, relate and bridge rules use the Conditions step to decide which objects match. Each condition compares a property on one object with a property on the other, and two objects match when the values are equal.
If the values describe the same thing in different formats, switch the property from Basic to Custom. See Match on a reshaped value.
Refine how rules match
Conditions match on exact values, which works when both data sources describe something the same way. When they don't, you have two options:
- Match on a reshaped value: when the difference is predictable, such as letter case or a domain suffix.
- Match on similarity: when the names differ in ways you can't write a rule for.
Match on a reshaped value
If the preview finds nothing for objects you know belong together, compare the property values on each side. A difference in case or format is the usual cause.
For example, web-01 won't match WEB-01.corp.local. Reshape one of them first.
- On the Conditions step, select the property you want to change, then switch it from Basic to Custom.
- In the editor that opens, enter an expression in
{{ }}that reshapes the value. The property value is available asvalue. For example:{{ value.toLowerCase() }}turnsWEB-01intoweb-01.{{ value.toLowerCase().split('.')[0] }}also drops the domain suffix, turningWEB-01.corp.localintoweb-01.- Expressions can be up to 512 characters.
- Click Preview and check the results before saving. An expression that returns nothing produces a rule that matches nothing, and the preview is the quickest way to see that.
Match on similarity
Where no amount of reshaping will reconcile two naming schemes, a relate rule can match on meaning instead. Smart matching compares what values mean rather than how they are spelled, so web-server-01 can match Web Server 1.
Smart matching is only available on relate rules, has to be enabled for your organization, and uses AI tokens. If your organization has reached its AI token limit, you can't preview or save a smart rule.
- Build a relate rule as usual and go to the Conditions step.
- Turn on the Smart toggle. The condition rows are replaced by a similarity slider.
- Choose how alike two objects have to be: Loose, Moderate, Strict or Exact. The slider opens on Strict, so loosen it only if the preview finds too little.
- Click Preview and read the results closely. A loose setting relates objects that merely sound similar.
- Click Save and run.
Smart matching can't be turned off on a saved rule. To switch back to conditions, create a new rule and delete the old one.
Check and manage your rules
Each rule on the Custom Rules tab shows its run status: Not Run, Running, Complete, Warning or Error. From the row's actions you can Re-evaluate rule, Edit rule or Delete rule. You can't change a rule's type after saving it.
On the Catalog Rules tab, Delete rule on an accepted rule rejects it rather than deleting it, so you can accept it again later.
Rules that ship with your data sources are listed on the Data Source Rules tab, grouped by data source. They can't be edited.
If a rule's data source is removed, the rule shows as Disabled. Edit it to pick another data source.
To see what a rule has done, open the map from a workspace or an object it affects. Merged objects appear once with the icons of every data source they came from, and new relationships appear as labeled lines. See Explore the map to learn how to find your way around.
To check a merge, find the object with graph search and open its drilldown. The Correlated Objects panel shows each data source's record of it.