<?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: NIFI - Create alerts in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Create-alerts/m-p/196741#M83936</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/97215/jricogar.html" nodeid="97215"&gt;@Pepelu Rico&lt;/A&gt;&lt;P&gt;Use &lt;A href="https://community.hortonworks.com/questions/64337/apache-nifi-merge-content.html" target="_blank"&gt;MergeContent &lt;/A&gt;and &lt;STRONG&gt;RouteOnAttribute &lt;/STRONG&gt;processors before MonitorActivity Processor.&lt;/P&gt;&lt;P&gt;Configure &lt;STRONG&gt;&lt;EM&gt;MergeContent &lt;/EM&gt;&lt;/STRONG&gt;processor&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Minimum Number of Entries
&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;5&lt;/PRE&gt;&lt;P&gt;So now processor will wait for 5 flowfiles and only if there are 5 flowfiles then processor  merges all the flowfiles into 1 and transfer the flowfile to merged relationship.&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;Max Bin Age&lt;/STRONG&gt; property as a wildcard to force the bin to be merged, if we won't configure this property then processor will wait infinite time until it reaches 5 flowfiles.&lt;/P&gt;&lt;P&gt;Then use the Merged Relationship from MergeContent processor to RouteOnAttribute processor&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;RouteOnAttribute Configurations:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MergeContent &lt;/STRONG&gt;processor adds &lt;STRONG&gt;merge.count&lt;/STRONG&gt; attribute to the flowfile so use that attribute to check if the value is 5 then give this relationship to MonitorActivity&lt;STRONG&gt;(run this processor at 12:00)&lt;/STRONG&gt; processor.&lt;/P&gt;&lt;P&gt;Add &lt;STRONG&gt;new property&lt;/STRONG&gt; in &lt;STRONG&gt;&lt;EM&gt;RouteOnAttribute &lt;/EM&gt;&lt;/STRONG&gt;processor&lt;/P&gt;&lt;PRE&gt;${merge.count:equals(5)}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Flow:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;1.other processors&lt;BR /&gt;2.MergeContent --&amp;gt;use merged relation&lt;BR /&gt;3.RouteOnAttribute --&amp;gt;use new property relation&lt;BR /&gt;4.MonitorActivity
5.PutEmail&lt;/PRE&gt;&lt;P&gt;in case if you want sequential merging then refer to &lt;A href="https://community.hortonworks.com/questions/222881/nifi-merge-header-and-data-coming-from-different-f.html?childToView=222894#comment-222894" target="_blank"&gt;this&lt;/A&gt; link for flow and configurations.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Oct 2018 20:10:42 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2018-10-02T20:10:42Z</dc:date>
    <item>
      <title>NIFI - Create alerts</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Create-alerts/m-p/196738#M83933</link>
      <description>&lt;P&gt;Hello, I need create warnings and alerts. I will recive "a.txt" and "b.txt" files in a input folder, it's possible create a warning if the files are not received before 10 o'clock and create a alert if are not received before 12 o'clock? &lt;/P&gt;&lt;P&gt;thanks!! &lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 15:25:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Create-alerts/m-p/196738#M83933</guid>
      <dc:creator>jricogar</dc:creator>
      <dc:date>2018-10-01T15:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI - Create alerts</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Create-alerts/m-p/196739#M83934</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/97215/jricogar.html" nodeid="97215" target="_blank"&gt;@Pepelu Rico&lt;/A&gt;&lt;P&gt;Use &lt;STRONG&gt;MonitorActivity &lt;/STRONG&gt;processor for this case and Configure the processor as Cron Driven to run at 10:00AM,10:01AM&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Processor configs:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CronDriven&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;* 0,1 10 1/1 * ? *&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="91589-monitor.png" style="width: 1641px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17895i5C743CE83701BD2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="91589-monitor.png" alt="91589-monitor.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Threshold Duration
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;1 min //consider how much time elapse before considering the flow is inactive
&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P&gt;Continually Send Messages
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;false&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P&gt;Inactivity Message
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;Lacking activity as of time: ${now():format('yyyy/MM/dd HH:mm:ss')}; flow has been inactive for ${inactivityDurationMillis:toNumber():divide(60000)} minutes //change this message as per your requirements&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P&gt;Activity Restored Message
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;Activity restored at time: ${now():format('yyyy/MM/dd HH:mm:ss')} after being inactive for ${inactivityDurationMillis:toNumber():divide(60000)} minutes&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P&gt;Copy Attributes
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;false //include all the flowfile attributes in the content of flowfile&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P&gt;Monitoring Scope
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;cluster //determine activeness of flow&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P&gt;Reporting Node&lt;/P&gt;&lt;PRE&gt;primary //specify which node to send mail&lt;/PRE&gt;&lt;P&gt;in this way we are running Monitor Activity processor at 10:00AM,10:01AM,&lt;/P&gt;&lt;P&gt;at 10:00AM processor runs every second and check is there any flowfile.&lt;/P&gt;&lt;P&gt;at 10:01AM is to sent out mail for inactivity.&lt;/P&gt;&lt;P&gt;In the same way use another monitorActivity processor to run at 12 to send alert mail.&lt;/P&gt;&lt;P&gt;Flow:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="91590-flow.png" style="width: 2354px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17896i45EB61D7D410F29B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="91590-flow.png" alt="91590-flow.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Use inactivity relationship to send out the alert email and Configure PutEmail processor.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;If the Answer helped to resolve your issue,&lt;STRONG&gt; Click on Accept button below to accept the answer&lt;/STRONG&gt;, That would be great help to Community users to find solution quickly for these kind of issues.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 06:24:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Create-alerts/m-p/196739#M83934</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T06:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI - Create alerts</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Create-alerts/m-p/196740#M83935</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;&lt;/A&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;&lt;/P&gt;&lt;DIV&gt;I would need to look in an HDFS folder and check that before 10 a.m. there are 5 files, if there are not 5 files I should run PutSNS processor.&lt;/DIV&gt;&lt;DIV&gt;If there are 0 files, How can I check that? because in this case no fileflow would be sent&lt;/DIV&gt;
&lt;DIV&gt;Thanks!&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Oct 2018 15:11:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Create-alerts/m-p/196740#M83935</guid>
      <dc:creator>jricogar</dc:creator>
      <dc:date>2018-10-02T15:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI - Create alerts</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Create-alerts/m-p/196741#M83936</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/97215/jricogar.html" nodeid="97215"&gt;@Pepelu Rico&lt;/A&gt;&lt;P&gt;Use &lt;A href="https://community.hortonworks.com/questions/64337/apache-nifi-merge-content.html" target="_blank"&gt;MergeContent &lt;/A&gt;and &lt;STRONG&gt;RouteOnAttribute &lt;/STRONG&gt;processors before MonitorActivity Processor.&lt;/P&gt;&lt;P&gt;Configure &lt;STRONG&gt;&lt;EM&gt;MergeContent &lt;/EM&gt;&lt;/STRONG&gt;processor&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Minimum Number of Entries
&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;5&lt;/PRE&gt;&lt;P&gt;So now processor will wait for 5 flowfiles and only if there are 5 flowfiles then processor  merges all the flowfiles into 1 and transfer the flowfile to merged relationship.&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;Max Bin Age&lt;/STRONG&gt; property as a wildcard to force the bin to be merged, if we won't configure this property then processor will wait infinite time until it reaches 5 flowfiles.&lt;/P&gt;&lt;P&gt;Then use the Merged Relationship from MergeContent processor to RouteOnAttribute processor&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;RouteOnAttribute Configurations:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MergeContent &lt;/STRONG&gt;processor adds &lt;STRONG&gt;merge.count&lt;/STRONG&gt; attribute to the flowfile so use that attribute to check if the value is 5 then give this relationship to MonitorActivity&lt;STRONG&gt;(run this processor at 12:00)&lt;/STRONG&gt; processor.&lt;/P&gt;&lt;P&gt;Add &lt;STRONG&gt;new property&lt;/STRONG&gt; in &lt;STRONG&gt;&lt;EM&gt;RouteOnAttribute &lt;/EM&gt;&lt;/STRONG&gt;processor&lt;/P&gt;&lt;PRE&gt;${merge.count:equals(5)}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Flow:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;1.other processors&lt;BR /&gt;2.MergeContent --&amp;gt;use merged relation&lt;BR /&gt;3.RouteOnAttribute --&amp;gt;use new property relation&lt;BR /&gt;4.MonitorActivity
5.PutEmail&lt;/PRE&gt;&lt;P&gt;in case if you want sequential merging then refer to &lt;A href="https://community.hortonworks.com/questions/222881/nifi-merge-header-and-data-coming-from-different-f.html?childToView=222894#comment-222894" target="_blank"&gt;this&lt;/A&gt; link for flow and configurations.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 20:10:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Create-alerts/m-p/196741#M83936</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2018-10-02T20:10:42Z</dc:date>
    </item>
  </channel>
</rss>

