Community Articles

Find and share helpful community-sourced technical articles.
Welcome to the upgraded Community! Read this blog to see What’s New!


Recently I was asked how to Monitor and alert while MonitorDiskUsage or MonitorMemory Reporting Task WARNINGS are generated when it exceeds a predefined threshold, I am trying to capture the steps to implement the same.


  1. To test this, Make sure HDF-2.x version of NiFi is up an running.
  2. You Already have a MonitorDiskUsage/MonitorMemory Reporting task created and configured, set a lower threshold to force generate the alert while testing.


3. Make a note of the Reporting Task uuid to be monitored:


Creating a Flow to Monitor Reporting Task.

  1. Drop a GenerateFlowFile to execute every 5mins, with 1 byte file to trigger the flow.


2. Drop an UpdateAttribute processor to the canvas with below configuration:

NIFI_HOST    : <Your NiFi FQDN>
NIFI_PORT    : <Your NiFi http port>
REPORTING-TASK-UUID   : <Your MonitorDiskUsage or MonitorMemory controller service uuid>


3. Connect Success relationship of GenerateFlowFile to UpdateAttribute.

4. Drop a InvokeHTTP processor to the canvas, and configure it as below:

HTTP Method  : GET
Remote URL  :  http://${NIFI_HOST}:${NIFI_PORT}/nifi-api/reporting-tasks/${REPORTING-TASK-UUID}


5. Connect Success relation of UpdateAttribute to InvokeHTTP and auto terminate all relationships of InvokeHTTP processor but Response relationship.

6. Drop a EvaluateJsonPath processor to the canvas with below configuration:


7. Auto terminate All relationship of EvaluateJsonPath processor except Matched relationship and connect InvokeHTTP processor’s Response relation to it.

8. Drop a SplitJson processor to canvas with below Configurtaion. [The reason for splitting json is because the REST call to reporting task gives duplicate json array in the result, which contains details we need.]


9. Connect Matched relationship of EvaluateJsonPath to SplitJson processor.

10. Drop another EvaluateJsonPath processor to the canvas with below configuration:

LEVEL   : $.bulletin.level
MESSAGE  : $.bulletin.message
SOURCE-NAME : $.bulletin.sourceName
TIMESTAMP  : $.bulletin.timestamp


11. Add a connection with split relationship from SplitJson to second EvaluateJsonPath processor. Auto-terminate other relationships.

12. Add a ControlRate processor so that only one alert is sent for multiple json arrays with below configuration which passes only 1 flowfile per minute.


13. Add a connection from EvaluateJsonPath processor to ControlRate processor with FlowFile Expiration as 30 sec. Auto-terminate other relations.


14. Finally Drop an PutEmail processor to canvas with below configuration to sent your alerts, update with your SMTP details

SMTP Hostname   :
SMTP Port   : 587
SMTP Username   :
SMTP Password   :  Its_myPassw0rd_updateY0urs
SMTP TLS   : true
From    :
To    :
Subject    : ${SOURCE-NAME} ALERT

and message content should look something like below to grab all the values:

Message     : ${MESSAGE}
      LEVEL  : ${LEVEL}


15. Auto terminate all relationships of PutEmail processor and connect Success relationship of ControlRate processor to it.

16. Now you have your flow ready and can start it to monitor and sent Email Alert for UI Notification thrown by NiFi when Disk or Memory utilization exceeds given threshold. The Flow Would Look like below:


Staring the flow, Reporting task and testing it

1. Now lets start the MonitorDiskUsage Reporting task to generate an Alert to test it with below configuration with a lower threshold to force generate the alert. I am monitoring disk on my mac and it’s disk is more than 50% utilized, so I will get this WARNING in the NiFi UI.


2. As soon as this Warning show up and the flow created is running you will get alert in your inbox stating the same, similar as below:15125-12.png

3. This concludes the tutorial for Monitoring your Reporting Tasks with NiFi itself.

4. Too lazy to create the flow???.. Download my template here



NiFI Expression Language


Jobin George

Rising Star

@Jobin George can we monitor multiple disk usages from single reporting task(MonitorDiskUsage).

@Bharadwaj Bhimavarapu Not as of today. you need multiple MonitorDiskUsage tasks to do so. But I already did brought this up to product team and hopefully soon we may have that feature.

Version history
Last update:
‎08-17-2019 01:08 PM
Updated by: