Skip to content

Count Events Action

The Count Events action counts how many times a rule's condition evaluates to True. It records the total number of occurrences over time and the accumulated count is stored as a metric that can be reset automatically on a configurable schedule.

Note

The Count Events action is available only for data-driven, condition-based rules.

Creating a Count Events Action

Create Rule

  • Go to Settings Rules.
  • Enter Rule Name and choose Rule Type as Condition.
  • Drag and drop relevant data sources, operators, functions, and values to build your condition's expression.
  • Configure trigger settings according to your needs.
Configure Rule for Count Events
Configure Rule for Count Events

Add Action

  • Under Actions, click Add Action (+) and enter Action Name.
  • Set Action Type to Count Nodes.
  • Enter the following details:
    • Target ID: Device ID under which the event count is stored.
    • Metric Name: Metric name that stores the accumulated event count.
    • Counter Reset: Choose Every (eg. every 30 minutes) or Daily to define when the counter is automatically reset to zero.
  • Add the Action and Save the Rule.
Configure Count Events Action
Configure Count Events Action

Reset Count, Edit, and Delete Action

  • Reset Count allows manual count reset.
  • Edit Action allows you to edit.
  • Delete Action removes the count metric entirely.
Reset, Edit, and Delete Action
Reset, Edit, and Delete Action

Use Cases

Count Events is ideal for measuring how frequently events occur.

Common applications include:

  • Counting door openings.
  • Tracking alarm occurrences.
  • Measuring communication failures.
  • Recording threshold violations.
  • Counting machine fault events over a reporting period.

Need help?

Contact our support team support@machinechat.io