Specifying Matching Rules
Application Definitions and Business Transaction Definitions utilize the concept of Matching Rules to map technical requests to applications and business transactions. This page explains how to specify matching rules for application definitions and business transaction definitions.
Matching Rule Types
inspectIT provides different types of matching rules. The rules are based on a comparison of strings and, thus, have a common structure. In particular, all rules compare a reference value to a target value. The specification of the comparison is similar for all rule types. The rule types mainly differ in the specification of the reference value.
The following pictures shows the common elements of the rule types:Â
- Matching Rule Type: The type/name of the matching rule.
- Source of the Reference Value: The source of the reference value to compare the target value with
- Pattern Matching Type: Specifies how the target value shall be compared to the reference value.
- equals: reference value must be equal to the target value
- starts with:Â reference value must start with the target value
- ends with:Â reference value must end with the target value
- contains:Â reference value must contain the target value
- regex: In this case the target value is a regular expression. The reference value must match the specified regular expression.
- Target Value: String to compare the reference value to.
- Search in trace config: Some of the rules provide this row of configuration in addition. If search in trace is activated, then the specified comparison condition is evaluated not only for the first node in the call tree of the user request.
inspectIT then iterates over the call tree until the condition is met for any node in the call tree or the maximum search depth is reached in the call tree. A maximum search depth of -1 means that the search depth is unlimited. A value of 0 means that only the root node of the call tree is evaluated and, thus, is equivalent to the case that search in trace is disabled, at all.
Selection Rules
Some types of rules may provide a list of options (in a drop-down box) for the Target Value instead of providing a free text field. In this case, the Pattern Matching Type is implicitly set to equals. An example for this is the HTTP Request Mathod Matching rule type in the table below.
Â
Depending on the Matching Rule Type, the source of Reference Value differs. For some rule types, the Source of the Reference Value requires additional specification. The following table describes the differences of the available Matching Rule Types:
Screenshot / Matching Type | Description |
---|---|
This type of rule compares the URI of a user request to the target value. | |
This type of rule compares the value of an HTTP Parameter to the target value. This rule type requires the name of the HTTP parameter (Parameter name) to be used as addition information. | |
This type of rule checks whether the HTTP request method (GET, POST, PUT, etc.) equals to the selected value. | |
This type of rule compares the signature of a called method to the target value. Â | |
This type of rule compares the parameter value of a called method to the target value. This rule type requires two additional properties to be set to specify the reference value:
| |
This type of rule compares the IPs of the server handling the user request to the target value. Â | |
This type of rule compares the complete URL to the target value. | |
This type of rule compares the scheme of the URL to the target value. | |
This type of rule compares the server port to the target value. | |
This type of rule compares the HTTP query of a request to the target value. | |
This type of rule compares the name of the inspectIT agent to the target value. | |
This type of rule compares the name of the HTTP server to the target value |
Simple vs. Advanced Views
There are two different views for editing matching rules: Simple View and Advanced View. The Simple View is the default view, however, is less expressive than the Advanced View.Â
Â
To switch between the Simple and the Advanced View click on the  Enable/Disable advanced rules view button in the toolbar of the Matching Rules part:
The Advanced View is more expressive than the Simple View, hence, allowing to create more complex rules. While the Advanced View can show any rule expression from the Simple View, advanced rule expressions that are created with the Advanced View (and do not comply with the simple form) cannot be displayed in the Simple View. Hence, switching from the Advanced View may produce the following dialog box. In this case selecting Yes would discard all current changes in the matching rules.
Simple View
The Simple View is a plain list of an arbitrary amount of matching rules. Internally, the rule elements of this list are implicitly wrapped by an OR expression. Hence, the corresponding mapping is applied if any of these matching rules is evaluated to true. However, the Simple View does not allow to combine matching rules with an AND expression or negate rules. If this is required then the Advanced View should be used!
Advanced View
The Advanced View allows to specify any combination of boolean expressions while using the matching rules as leave nodes. The Advanced View displays expressions as a tree. The following screenshot shows the same rules as specified in the previous section (for the Simple View) in the Advanced View. Now, we see the OR expression explicitly while it was implicit in the Simple View. Selecting a matching rule in the tree opens a details view for that rule showing the configuration (analogous to the simple view).Â
OR, AND and NOT are container expressions that may have any child expressions. To add a child expression right-click on a container expression in the tree view and select from the context menu the expression or rule to be added as child:
By means of the Advanced View complex matching expressions can be created, if required:
Â