<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Apache Nifi Queue monitoring and Alerting in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Queue-monitoring-and-Alerting/m-p/388973#M246837</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Hi everyone, I have a requirement for Apache NiFi. In a NiFi flow, if files are stuck in a queue for more than a specified time, I should receive an email notification indicating that a file is stuck in the NiFi flow.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jun 2024 09:24:55 GMT</pubDate>
    <dc:creator>donald795</dc:creator>
    <dc:date>2024-06-10T09:24:55Z</dc:date>
    <item>
      <title>Apache Nifi Queue monitoring and Alerting</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Queue-monitoring-and-Alerting/m-p/388459#M246677</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I have a requirement for Apache Nifi. In a nifi flow if there are files stuck in queue for more than some specified time let say 5 mins , I should get an email saying that file is stuck in the nifi flow.&lt;/P&gt;&lt;P&gt;Is that possible ? Please let me know if there is any possible solution.&lt;/P&gt;&lt;P&gt;Thanks in advance !!&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 17:24:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Queue-monitoring-and-Alerting/m-p/388459#M246677</guid>
      <dc:creator>udayAle</dc:creator>
      <dc:date>2024-05-28T17:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi Queue monitoring and Alerting</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Queue-monitoring-and-Alerting/m-p/388960#M246833</link>
      <description>&lt;P&gt;I believe we can determine this by analyzing the log. For instance, if a job is stuck in a queue, we can check the log for specific statuses such as "suspended" or "wait." If such statuses are found, we can trigger an email notification.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2024 10:45:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Queue-monitoring-and-Alerting/m-p/388960#M246833</guid>
      <dc:creator>saquibsk</dc:creator>
      <dc:date>2024-06-09T10:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi Queue monitoring and Alerting</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Queue-monitoring-and-Alerting/m-p/388973#M246837</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Hi everyone, I have a requirement for Apache NiFi. In a NiFi flow, if files are stuck in a queue for more than a specified time, I should receive an email notification indicating that a file is stuck in the NiFi flow.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 09:24:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Queue-monitoring-and-Alerting/m-p/388973#M246837</guid>
      <dc:creator>donald795</dc:creator>
      <dc:date>2024-06-10T09:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi Queue monitoring and Alerting</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Queue-monitoring-and-Alerting/m-p/388980#M246839</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/104096"&gt;@udayAle&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Some NiFi Processors process FlowFiles one at a time and other may process batches of FlowFiles in a single thread execution.&amp;nbsp; &amp;nbsp; Then there are processors like the MergeContent and MergeRecord that allocate FlowFiles to bins and then only merges that bin once the min criteria is met to merge.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;With non merge type processors, a FlowFile that becomes results in a hung thread or long thread execution would block processing of FlowFiles next in queue.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For Merge type processors, depending on data volumes and configuration 5 mins might be expected behavior (of your you could set a max bin age of 5 mins to force a bin to merge even if mins have not been satisfied).&lt;BR /&gt;&lt;BR /&gt;So i think there are two approaches to look at here.&amp;nbsp; One monitors long running threads and the the other looks as failures.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;H3&gt;&lt;FONT size="4"&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#runtime_monitoring_properties" target="_blank" rel="noopener"&gt;Runtime Monitoring Properties&lt;/A&gt;: When configured this background process checks for long running threads and produces log output and NiFi Bulletins when a thread exceeds a threshold.&amp;nbsp; You could build an alerting dataflow around this using the SiteToSiteBulletinReportingTask, some Routing processors(to filter specific types of bulletins related to long running tasks) and then an email processor.&lt;BR /&gt;&lt;/FONT&gt;&lt;/H3&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="4"&gt;The majority of processors that have potential for failures to occur will have a failure relationship.&amp;nbsp; You can build a dataflow using that failure relationship to alert on those failures.&amp;nbsp; Consider a failure relationship routed to an update attribute that use the advanced UI to increment a failure counter that then feeds a routeOnAttribute processor that handles routing base on number of failed attempts.&amp;nbsp; After x number of failures it could send an email via putEmail.&lt;BR /&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT size="4"&gt;Apache NiFi does not have a background "Queued Duration" monitoring capability.&amp;nbsp; Programmatically building one would be expensive resource wise.&amp;nbsp; As you would need to monitor every single constantly changing connection and parse out and FlowFile with a "Queued Duration" in excess of X amount of time.&amp;nbsp; &amp;nbsp;Consider a Processor that is hung, the connection would continue to grow until backpressure kicks in and forces upstream processor to start queueing.&amp;nbsp; You could end up with 10,000 FlowFiles alerting on queued duration.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hopefully this helps you maybe to look at the use case a little differently.&amp;nbsp; &amp;nbsp;Keep in mind that all monitoring including examples I provided will have impact on performance.&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;Please help our community thrive. If you found&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt;&amp;nbsp;of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 13:51:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Queue-monitoring-and-Alerting/m-p/388980#M246839</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2024-06-10T13:51:09Z</dc:date>
    </item>
  </channel>
</rss>

