MonitorActivity 2025.10.2.19

捆绑包

org.apache.nifi | nifi-standard-nar

描述

监控流的活动情况:当在指定时间内未检测到任何数据流动时,发出一个指示信号;流活动恢复后,再次发出指示信号。

标签

active、activity、detection、flow、inactive、monitor

输入要求

REQUIRED

支持敏感的动态属性

false

属性

属性

描述

活动已恢复消息

将作为 FlowFiles 内容发送至“activity.restored”关系的消息

持续发送消息

如果为 True,将在每个最短持续时间范围内持续发送不活动指示信号,直到恢复活动状态;如果为 False,则仅在流首次处于非活动状态时发送指示信号

复制属性

如果为 True,则会将所有 FlowFile 属性从恢复活动状态的 FlowFile 复制到新创建的指示信号 FlowFile 中

非活动消息

将作为 FlowFiles 内容发送至“inactive”关系的消息

监控范围

Specify how to determine activeness of the flow. 'node' means that activeness is examined at individual node separately. It can be useful if DFM expects each node should receive flow files in a distributed manner. With 'cluster', it defines the flow is active while at least one node receives flow files actively. If NiFi is running as standalone mode, this should be set as 'node', if it 's' cluster ', NiFi logs a warning message and act as' node'scope.

报告节点

Specify which node should send notification flow-files to inactive and activity.restored relationships. With 'all', every node in this cluster send notification flow-files. 'primary' means flow-files will be sent only from a primary node. If NiFi is running as standalone mode, this should be set as 'all', even if it 's' primary ', NiFi act as' all'.

重启时重置状态

当处理器启动或重新启动时,如果设置为 True,则初始状态将始终处于活动状态。否则,将保留上次报告的流状态。

持续时间下限

确定必须经过多长时间才能将流视为不活动状态

等待活动

当处理器启动或重新启动时,如果设置为 True,则仅在事先有活动时才发送不活动指示信号。否则,即使事先没有活动,也会发送不活动指示信号。

状态管理

范围

描述

LOCAL

MonitorActivity 将每个节点的最后一个时间戳存储为状态,以便它可以检查集群范围内的活动。如果“复制属性”设置为 True,则 FlowFile 属性也会被保留。在本地范围内,如果流处于非活动状态,它会存储上次已知的活动时间戳。

CLUSTER

MonitorActivity 将每个节点的最后一个时间戳存储为状态,以便它可以检查集群范围内的活动。如果“复制属性”设置为 True,则 FlowFile 属性也会被保留。在本地范围内,如果流处于非活动状态,它会存储上次已知的活动时间戳。

关系

名称

描述

activity.restored

此关系用于 FlowFiles 在一段时间不活动后路由至“success”时,传输“活动已恢复”指示信号。

inactive

此关系用于在“持续时间下限”内无 FlowFiles 路由至“success”时,传输“Inactivity”指示信号。

success

所有传入的 FlowFiles 都将路由至 success

写入属性

名称

描述

inactivityStartMillis

“Inactivity”状态开始的时间,以自 Unix 纪元起的毫秒为单位。

inactivityDurationMillis

“Inactivity”状态持续的毫秒数

语言: 中文