Defining rules
Rules help streamline topologies and conserve system resources, for example by merging different observer records of the same resource into a single composite resource, or by excluding specific changes from being recorded against a resource history.
Before you begin
- You must know your tenant ID.
- You also need to know specific details about resources for which you intend to develop rules. For example, to create merge rules you must know which resources exist as duplicate records before you can merge these into composites.
About this task
Tokens
Rules copy the values of properties to a token. Tokens are sets of strings that behave in ways
specific to each rule type. You can combine several properties into a single token by using
${propertyName}.
- Token filters
- An 'Include' token filter applies only to resources or groups having the listed tokens.
Rule types
You use different types of rules for different purposes. The rule type
(ruleType) can be one of the following:
- Merge rules (mergeRule)
- Define a merge rule to populate the mergeTokens of resources matched by the rule to prevent duplicate records of the same resource from being displayed in the topology.
- Match token rules (matchTokensRule)
- Define a match tokens rule to copy the value of another field to the matchTokens field so that it can be used to match events to resources.
- Tags rules (tagsRule)
- Define a tags rule to copy the value of another field to the tags field so that it becomes searchable in the UI.
- History rules (historyRule)
- Define a history rule to identify properties that change every observation, but that don't indicate an important change, for example a host's sysUpTime property.
- File enrichment rules
- Define a file enrichment rule in order to enrich resources as they are loaded into the topology service database with their geographical location.
- Events filter rules (eventsFilterRule)
- Define an events filter rule to prevent status derived from observer jobs from generating events in the system.
- Business criticality rules
- Define a business criticality rule to copy a particular property of a resource into the resource's businessCriticality property, which is then used to create a business criticality rule.
Custom observer rules:
Use the observers parameter to list the observers to which a rule applies.
- Jenkins Observer
- A mergeRule and an eventsFilterRule are included
out-of-the-box for the Jenkins Observer.
A merge rule to merge Artifactory's published Docker modules information with the information provided by the Docker Observer is provided here: Defining Jenkins data merge rules.
Procedure
Access Topology configuration | Rules