The Count Value by Time Node is used to count how many times a specified value appears in incoming payloads within a defined time window. It optionally supports filtering by key-value conditions and can aggregate counts across multiple input sources.
What It Does
This node maintains a rolling time window and counts how many incoming events meet a specified condition (e.g., status = Fault
) during that interval. It's designed for rate-based monitoring, such as alerting on frequency of failures or threshold-based tracking over time.
The node supports filtering logic (e.g., count only when a field equals a certain value) and outputs a single numeric field representing the count.
Step-by-Step: How to Configure the Count Value by Time Node
-
Add the node
-
Drag the Count Value by Time Node from the Logic panel into the workflow canvas.
-
-
Connect upstream data sources
-
Link one or more nodes that emit events or metrics you want to track and count.
-
-
Open configuration
-
Double-click the node to access the configuration panel.
-
⚙️ Configuration Fields
Field | Requirement | Description |
---|---|---|
Node Name* | Required | Identifier for the node in the workflow. |
Count Field* (Pending confirmation) | Required | The JSON key to monitor and count occurrences of. |
Timeframe (seconds)* | Required | Time window in seconds over which to perform the count (e.g., 60 = 1 minute). |
Filter Field* (Pending confirmation) | Optional | JSON key to apply a conditional filter (e.g., status ). Only matching values are counted. |
Data Output Field (Pending confirmation) | Required | Field name for the resulting count in the output payload. |
Activation | Optional (future use) | Reserved for controlling trigger behavior (e.g., enable/disable logic). |
Logical Operand* | Required | Determines how filters are combined if multiple sources are configured:AND or OR . |
Select Data Source Filter* | Required | Select which data source(s) should be included in the count. |
Output Example
{
"event_count": 12
}
Where event_count
is defined in the Data Output Field and 12
represents the number of matches within the past N seconds.
Best Practices
-
Use this node after normalization to ensure consistent field names across devices.
-
For performance and clarity, avoid overlapping time windows in complex workflows.
-
If filter keys are optional or sparse, ensure fallback logic is applied in the workflow.
-
Choose output field names that clearly indicate the count and timeframe (e.g.,
alerts_last_60s
).
Use Cases
-
Count how many times a device reports
status = Error
in the last 30 seconds -
Monitor the number of API calls per user within the past 10 minutes
-
Trigger escalation workflows if a sensor exceeds a threshold multiple times in a short span
-
Aggregate per-label or per-UID event frequencies for display on dashboards
FAQ
Q: What happens when no data matches the condition during the timeframe?
A: The output count will be 0
.
Q: Can I use multiple filters?
A: Currently, the node supports one filter condition, but filtering can be extended using upstream logic nodes (e.g., Filter, Rule Builder).
Q: Is the count emitted on a schedule or per incoming event?
A: The node emits updates when triggered by incoming events and internally manages the time window.