blob: 90a7fa4b4de823b00126f7586315ed29b26a6935 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>MonitorActivity</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">MonitorActivity</h1><h2>Description: </h2><p>Monitors the flow for activity and sends out an indicator when the flow has not had any data for some specified amount of time and again when the flow's activity is restored</p><h3>Tags: </h3><p>monitor, flow, active, inactive, activity, detection</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the <a href="../../../../../html/expression-language-guide.html">NiFi Expression Language</a>.</p><table id="properties"><tr><th>Display Name</th><th>API Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name"><strong>Threshold Duration</strong></td><td>Threshold Duration</td><td id="default-value">5 min</td><td id="allowable-values"></td><td id="description">Determines how much time must elapse before considering the flow to be inactive<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>Continually Send Messages</strong></td><td>Continually Send Messages</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">If true, will send inactivity indicator continually every Threshold Duration amount of time until activity is restored; if false, will send an indicator only when the flow first becomes inactive</td></tr><tr><td id="name"><strong>Inactivity Message</strong></td><td>Inactivity Message</td><td id="default-value">Lacking activity as of time: ${now():format('yyyy/MM/dd HH:mm:ss')}; flow has been inactive for ${inactivityDurationMillis:toNumber():divide(60000)} minutes</td><td id="allowable-values"></td><td id="description">The message that will be the content of FlowFiles that are sent to the 'inactive' relationship<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Activity Restored Message</strong></td><td>Activity Restored Message</td><td id="default-value">Activity restored at time: ${now():format('yyyy/MM/dd HH:mm:ss')} after being inactive for ${inactivityDurationMillis:toNumber():divide(60000)} minutes</td><td id="allowable-values"></td><td id="description">The message that will be the content of FlowFiles that are sent to 'activity.restored' relationship<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Copy Attributes</td><td>Copy Attributes</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">If true, will copy all flow file attributes from the flow file that resumed activity to the newly created indicator flow file</td></tr><tr><td id="name"><strong>Monitoring Scope</strong></td><td>Monitoring Scope</td><td id="default-value">node</td><td id="allowable-values"><ul><li>node</li><li>cluster</li></ul></td><td id="description">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.</td></tr><tr><td id="name"><strong>Reporting Node</strong></td><td>Reporting Node</td><td id="default-value">all</td><td id="allowable-values"><ul><li>all</li><li>primary</li></ul></td><td id="description">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'.</td></tr></table><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>inactive</td><td>This relationship is used to transfer an Inactivity indicator when no FlowFiles are routed to 'success' for Threshold Duration amount of time</td></tr><tr><td>success</td><td>All incoming FlowFiles are routed to success</td></tr><tr><td>activity.restored</td><td>This relationship is used to transfer an Activity Restored indicator when FlowFiles are routing to 'success' following a period of inactivity</td></tr></table><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3><table id="writes-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>inactivityStartMillis</td><td>The time at which Inactivity began, in the form of milliseconds since Epoch</td></tr><tr><td>inactivityDurationMillis</td><td>The number of milliseconds that the inactivity has spanned</td></tr></table><h3>State management: </h3><table id="stateful"><tr><th>Scope</th><th>Description</th></tr><tr><td>CLUSTER</td><td>MonitorActivity stores the last timestamp at each node as state, so that it can examine activity at cluster wide.If 'Copy Attribute' is set to true, then flow file attributes are also persisted.</td></tr></table><h3>Restricted: </h3>This component is not restricted.<h3>Input requirement: </h3>This component requires an incoming relationship.<h3>System Resource Considerations:</h3>None specified.</body></html>