Adding and Using Alarm Server Counters

Alarm counters are real-time, configurable data points exposed from the Alarm Server that appear under each Area and directly in the root. They count the alarms that match a filter expression, or calculate a value such as the maximum severity across those alarms.

The Alarm Server counters behave the same way as the alarm counters in Assets. If you have interacted with the counters in Assets before, the Alarm Server counters should be familiar.

All alarm sources under an Area, single or nested, are eligible to be counted by a counter. Alarms must not be in the Inactive Acknowledged state; in this state, the alarm disappears from the Alarm Viewer. The Alarm Server only processes alarm counters that the client component scans. Counters that are not read by a client do not consume any resources. A new value gets counted every second, regardless of the scan rate requested by the client.

Adding Counters

In the default configuration, some counters already exist and can be exposed as data points to clients. Some examples include the count of active and acknowledged alarms (ActiveAckedCount) and the maximum severity of active and acknowledged alarms (ActiveAckedMaxSeverity). You can also add a custom counter.

To add a custom counter:

  1. Open Workbench. In the Project Explorer, expand your project > Alarms and Notifications > Alarm Server > Product Configuration, and then right-click Counters and select Add Counter.

  2. In Name, enter a unique identifier for the new counter. You can add a description for the counter, but you are not required to.

  3. Click next to Alarm Filter to open the expression editor and enter an expression that selects the alarms to count. For example, select Variables from the buttons on the right side, choose a Field, and then configure the expression.

    The expression must return a Boolean value or a value that can be converted to a Boolean. The counter includes each alarm for which the expression is true. The expression can use only the fields of the alarm, not other data points. For example, x={{BaseConditionType.NewState}} == 7 selects alarms that are enabled, active, and acknowledged.

  4. Select the Counter type from the dropdown list:

    • Simple count—The counter returns the number of alarms that match the Alarm Filter. The Value field is unavailable.

    • Maximum, Minimum, Range, Average, or Sum—The counter evaluates the Value expression for each alarm that matches the Alarm Filter and returns the maximum, minimum, range, average, or sum of the results. Click next to Value and enter the expression. For example, x={{BaseEventType.Severity}} uses the severity of each alarm.

      If no alarms match, the value of the counter appears empty.

  5. Click Apply, and the custom counter appears under the Counters node.

    The counters are automatically calculated at every level of the alarm hierarchy.

Using a Counter Value in a GraphWorX Display

Each counter is a data point, so you can show its value in any GraphWorX control that takes a data source. The counters directly under Alarm Server cover the alarms in every Area. The counters under an Area cover only the alarms in that Area and its nested Areas.

To display a counter value in a GraphWorX display:

  1. Open GraphWorX and, on the Dynamics ribbon, select Process Point.

  2. Drag the mouse diagonally across the canvas to make a rectangle for inserting the process point. The process point is added to the screen and in the Dynamics pane on the right, a property grid is displayed with the DataSource box pre-selected.

  3. In the DataSource property, click to open the Data Browser.

  4. On the Data Points tab, expand Alarms and Notifications > Alarm Server, select a counter, and then click OK. To count only the alarms in one Area, expand that Area and select the counter under it.

  5. In the upper right corner, click Runtime. The process point shows the current value of the counter, which updates as alarms change state.