Apurw
Apurw

Reputation: 113

Any way to monitor Nifi Processors? Any Utility Dashboard?

If I have developed a NiFi flow and a support person wants to view what's the current state and which processor is currently running, which processor already ran, which ones completed?

I mean to say any dashboard kind of utility provided by NiFi to monitor activities ?

Upvotes: 3

Views: 12128

Answers (5)

DTushar
DTushar

Reputation: 1

You can use MonitoFi. It is an open source tool that is highly configurable, uses nifi-api to collect stats about various nifi processors and stores those in influxdb. It also comes with Grafana Dashboards and Alerting functionality. http://www.monitofi.com or https://github.com/microsoft/MonitoFi

Upvotes: 0

Dean Jain
Dean Jain

Reputation: 2198

1. In built monitoring in Apache NiFi.

Bulletin Board

The bulletin board shows the latest ERROR and WARNING getting generated by NiFi processors in real time. To access the bulletin board, a user will have to go the right hand drop down menu and select the Bulletin Board option. It refreshes automatically and a user can disable it also. A user can also navigate to the actual processor by double-clicking the error. A user can also filter the bulletins by working out with the following −

  • by message

  • by name

  • by id

  • by group id

Data provenance UI

To monitor the Events occurring on any specific processor or throughout NiFi, a user can access the Data provenance from the same menu as the bulletin board. A user can also filter the events in data provenance repository by working out with the following fields −

  • by component name
  • by component type
  • by type

NiFi Summary UI

Apache NiFi summary also can be accessed from the same menu as the bulletin board. This UI contains information about all the components of that particular NiFi instance or cluster. They can be filtered by name, by type or by URI. There are different tabs for different component types. Following are the components, which can be monitored in the NiFi summary UI −

  • Processors
  • Input ports
  • Output ports
  • Remote process groups
  • Connections
  • Process groups

In this UI, there is a link at the bottom right hand side named system diagnostics to check the JVM statistics.

2. Reporting Tasks

Apache NiFi provides multiple reporting tasks to support external monitoring systems like Ambari, Grafana, etc. A developer can create a custom reporting task or can configure the inbuilt ones to send the metrics of NiFi to the externals monitoring systems. The following table lists down the reporting tasks offered by NiFi 1.7.1.

Reporting Task:

  1. AmbariReportingTask - To setup Ambari Metrics Service for NiFi.
  2. ControllerStatusReportingTask - To report the information from the NiFi summary UI for the last 5 minute.
  3. MonitorDiskUsage - To report and warn about the disk usage of a specific directory.
  4. MonitorMemory To monitor the amount of Java Heap used in a Java Memory pool of JVM.
  5. SiteToSiteBulletinReportingTask To report the errors and warning in bulletins using Site to Site protocol.
  6. SiteToSiteProvenanceReportingTask To report the NiFi Data Provenance events using Site to Site protocol.

3. NiFi API

There is an API named system diagnostics, which can be used to monitor the NiFI stats in any custom developed application.

Request
http://localhost:8080/nifi-api/system-diagnostics
Response
{
   "systemDiagnostics": {
      "aggregateSnapshot": {
         "totalNonHeap": "183.89 MB",
         "totalNonHeapBytes": 192819200,
         "usedNonHeap": "173.47 MB",
         "usedNonHeapBytes": 181894560,
         "freeNonHeap": "10.42 MB",
         "freeNonHeapBytes": 10924640,
         "maxNonHeap": "-1 bytes",
         "maxNonHeapBytes": -1,
         "totalHeap": "512 MB",
         "totalHeapBytes": 536870912,
         "usedHeap": "273.37 MB",
         "usedHeapBytes": 286652264,
         "freeHeap": "238.63 MB",
         "freeHeapBytes": 250218648,
         "maxHeap": "512 MB",
         "maxHeapBytes": 536870912,
         "heapUtilization": "53.0%",
         "availableProcessors": 4,
         "processorLoadAverage": -1,
         "totalThreads": 71,
         "daemonThreads": 31,
         "uptime": "17:30:35.277",
         "flowFileRepositoryStorageUsage": {
            "freeSpace": "286.93 GB",
            "totalSpace": "464.78 GB",
            "usedSpace": "177.85 GB",
            "freeSpaceBytes": 308090789888,
            "totalSpaceBytes": 499057160192,
            "usedSpaceBytes": 190966370304,
            "utilization": "38.0%"
         },
         "contentRepositoryStorageUsage": [
            {
               "identifier": "default",
               "freeSpace": "286.93 GB",
               "totalSpace": "464.78 GB",
               "usedSpace": "177.85 GB",
               "freeSpaceBytes": 308090789888,
               "totalSpaceBytes": 499057160192,
               "usedSpaceBytes": 190966370304,
               "utilization": "38.0%"
            }
         ],
         "provenanceRepositoryStorageUsage": [
            {
               "identifier": "default",
               "freeSpace": "286.93 GB",
               "totalSpace": "464.78 GB",
               "usedSpace": "177.85 GB",
               "freeSpaceBytes": 308090789888,
               "totalSpaceBytes": 499057160192,
               "usedSpaceBytes": 190966370304,
               "utilization": "38.0%"
            }
         ],
         "garbageCollection": [
            {
               "name": "G1 Young Generation",
               "collectionCount": 344,
               "collectionTime": "00:00:06.239",
               "collectionMillis": 6239
            },
            {
               "name": "G1 Old Generation",
               "collectionCount": 0,
               "collectionTime": "00:00:00.000",
               "collectionMillis": 0
            }
         ],
         "statsLastRefreshed": "09:30:20 SGT",
         "versionInfo": {
            "niFiVersion": "1.7.1",
            "javaVendor": "Oracle Corporation",
            "javaVersion": "1.8.0_151",
            "osName": "Windows 7",
            "osVersion": "6.1",
            "osArchitecture": "amd64",
            "buildTag": "nifi-1.7.1-RC1",
            "buildTimestamp": "07/12/2018 12:54:43 SGT"
         }
      }
   }
}

Upvotes: 3

Óscar Andreu
Óscar Andreu

Reputation: 1700

You can use the Reporting tasks and NiFi itself, or a new NiFi instance, that is what I choose. To do that you must do the following:

Open the reporting task menu

enter image description here

And add the desired reporting tasks

enter image description here

And configure it properly

enter image description here

Then create a flow to manage the reporting data

enter image description here

In my case I am putting the information into an Elasticsearch

enter image description here

Upvotes: 4

HereAndBeyond
HereAndBeyond

Reputation: 1454

You also can use nifi-api for monitoring. You can receive detailed information about each processor group, controller service or processor.

Upvotes: 0

Andy
Andy

Reputation: 14184

There are numerous ways to monitor NiFi flows and status. The status bar along the top of the UI shows running/stopped/invalid processor counts, and cluster status, thread count, etc. The global menu at the top right has options for monitoring JVM usage, flowfiles processed/in/out, CPU, etc.

Each individual processor will show a status icon for running/stopped/invalid/disabled, and can be right-clicked for the same JVM usage, flowfile status, etc. graphs as the global view, but for the individual processor. There are also some Reporting Tasks provided by default to integrate with external monitoring systems, and custom reporting tasks can be written for any other desired visualization or monitoring dashboard.

NiFi doesn’t have the concept of batch/job processing, so processors aren’t “complete”.

Upvotes: 3

Related Questions