Skip to content

Count Devices Action (Previously Count Nodes)

The Count Devices action maintains a live count of how many devices currently satisfy a rule's condition. As devices begin or stop meeting the condition, the count is automatically updated.

Note

The Count Devices action is available only for data-driven, condition-based Rules.

Creating a Count Devices 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 Devices
Configure Rule for Count Devices

Add Action

  • Under Actions, click Add Action (+) and enter Action Name.
  • Set Action Type to Count Devices.
  • Enter the following details:
    • Target ID: A virtual device ID under which the count metric is stored.
    • Metric Name: Stores the current node count and can be displayed on dashboards, included in reports, or referenced by other rules.
  • Add the Action and Save the Rule.
Configure Count Devices Action
Configure Count Devices Action

Reset Count, Edit, and Delete Action

  • Reset Count clears the current count and removes all tracked device state.
  • 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 Devices is useful for monitoring the current state of multiple devices.

Common applications include:

  • Counting machines currently in an alarm state.
  • Tracking the number of sensors exceeding environmental thresholds.
  • Monitoring online or offline devices.
  • Counting equipment currently operating.
  • Measuring how many devices satisfy a wildcard rule.

Need help?

Contact our support team support@machinechat.io