![]() |
Some plugins like FKM and SQL-Toolkit have built-in options to show counters as headline cell. This article talks about the configuration to achieve the same for other plugins. We will create a new headline for the row count as an example. |
![]() |
Add Headline to DataviewIn Geneos, the samplers can add custom table cells and headlines as placeholders to display additional data. In the sampler's Advanced tab, please scroll down to the Dataviews option and select Add New to match the sampler's dataview name (which should be the sampler's Name in most cases). Then at the Additions button, it allows to create headlines, columns and rows to the dataview. We will be creating a new headline named rowCount. Populate the Row CountAfter creating a new headline cell, you can configure a gateway rule to show the number of rows through the count() statistical function. Statistical functions help to make data more relevant by providing summary data rather than raw data. Below is the syntax for the value count function. value count(wpath "myPathAlias" value) "wpath" is a wildcard path and can resolve to one or many targets. The Path Alias should be configured at the rule's Advanced tab. For example, we can use the following relative path to return the column named "myColumnName" from the same dataview as the Targets path. ../../rows/row/cell[(@column="myColumnName")] |
![]() |
Additional Information1. If you are doing a count of a column where the dataview may be empty, you can use +0 in the value setting in case the path evaluates to no cells. In the example: value count(wpath "myPathAlias" value) + 0 The value will then always display at least a 0 rather than an empty cell. 2. In case you want to count number of cells matching specific values, you can configure this in the Path Alias. As an example, below is the syntax of Path Alias to match empty cells (value field is set to match "BLANK_STRING"). ../../rows/row/cell[(@value="")][(@column="myColumnName")] For more information on the different functions you can apply on rules, please refer to: Where can I see a list of functions the gateway rule engine supports |
![]() |
There is an undocumented syntax that users may see in their legacy configurations that short-cuts the Path Alias declarations. It uses two percent signs, like this: value count(%%../../../rows/row/cell[(@column="myColumnName")] value) We strongly advise not using this and updating configurations to use Path Aliases as soon as possible. |
-
Tags:
Comments
0 comments
Please sign in to leave a comment.