Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 02-17-2017 02:48 PM
Hi All,
How can an external system check on the health of the NiFi nodes in a cluster. For example, a load balancer that's pushing data to NiFi cluster nodes needs to know which nodes have NiFi up and running; what property/state/flag in the NiFi node can be leveraged to verify that the NiFi instance is running on the Node and can accept data from the load balancer.
Thanks
Created 02-17-2017 03:03 PM
Hi @Raj B
One endpoint that gives a lot of metrics about current load, etc would be the system diagnostics REST endpoint. Depending on what else you're looking for (individual processor state, etc) there are other endpoints that might be useful.
REST documentation is available at https://nifi.apache.org/docs/nifi-docs/rest-api/ or from the help menu of a NiFi instance.
Thanks,
Bryan
Created 02-17-2017 03:03 PM
Hi @Raj B
One endpoint that gives a lot of metrics about current load, etc would be the system diagnostics REST endpoint. Depending on what else you're looking for (individual processor state, etc) there are other endpoints that might be useful.
REST documentation is available at https://nifi.apache.org/docs/nifi-docs/rest-api/ or from the help menu of a NiFi instance.
Thanks,
Bryan
Created 02-17-2017 03:26 PM
Great, thanks @brosander
Created 02-17-2017 03:52 PM
No problem, one thing to know about the REST api is that the url paths are all prefixed with /nifi-api
e.g.
For localhost 8080 system diagnostics, you'd want to hit:
Created 02-17-2017 04:49 PM
Hi @brosander, just want to clarify my understanding; if a GET request to the URL http://server:8080/nifi-api/system-diagnostics returns any data then the assumption is NiFi is up and running, and when no response is returned it is safe to conclude that NiFi on the node is not available. Is that right ?
Thanks
Created 04-28-2017 08:16 PM
In case of a secure NiFi instance, you can check for heartbeat with this curl command below
curl 'https://<nifi-server>:8077/nifi-api/access/token' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --data 'username=<username>&password=<password>' --compressed --insecure
if you get a token back, the NiFi instance is up and running.
Here is the link where this is posted/answered - https://community.hortonworks.com/questions/96713/nifi-api-unable-to-validate-the-access-token-error...