The error message is rather self-explanatory. This warning message appears when a gateway rule is defined that refers to data from an XPath (usually path aliases) with a wildcard function. The rule should be revised such that no wildcard should be used for any Path Aliases, or should be used inside the first() function together with the WPATH keyword. |
The warning message alerts the user that a potential problem is present. Otherwise, a wildcarded XPath can potentially return more than one value, confusing the rule. The XPaths sometimes need to be examined more closely, where in certain cases there might not be an "*" character visible. This can happen, for example, when an XPath contains "any dataview" inside, which may match more than 1 dataview.
One other common situation that can be difficult to spot is if the XPath contains a Sampler name. The Type will need to be defined (or set to BLANK_STRING), otherwise this is considered a wildcarded path. The reason is that Managed Entities can attach a Sampler multiple times if defined under a different Type, so it needs the Type name to make the XPath unique. Depending on the usage situation, the warning message can be fixed in different ways. Below are some examples: 1. If the usage is to capture a specific table cell or headline cell, it is usually easier to rewrite with a Relative Path rather than Absolute Path. The following example gets a value from an adjacent column on the same dataview. Original Path Alias (absolute path, not recommended): /geneos/gateway/directory/probe/managedEntity/sampler/dataview/rows/row/cell[(@column="adjacent_column_name")] Revised Path Alias (relative path): ../cell[(@column="adjacent_column_name")] 2. If the usage is to capture data from multiple cells to provide a summary or calculation, gateway functions like maximum(), minimum(), average(), total() and count() can be used. Please refer to the Gateway Reference Guide for more details on the available functions. The following example gives the number of items matched by the path alias. In this case, it is generally recommended that the "Evaluate on Dataview Sample" option be turned on at the Gateway Rule's Advanced tab. Example Rule Block: set $(path_counter) count(wpath "My Path Alias" value) 3. If the usage is to capture any single data from a wildcarded path, the first() function and wpath (meaning wildcarded path) keyword can be used. The gateway rule will then pick the first matching XPath and return the value. This usage should generally be avoided though, since the behaviour can sometimes look random if the XPath matches multiple data cells. Example Rule Block: set $(first_value) first(wpath "My Path Alias" value) P.S. The syntax checking for wildcarded paths and the first() function was added in version GA3.0.6 (GWX-2230). |
Comments
0 comments
Please sign in to leave a comment.