Support Questions

Find answers, ask questions, and share your expertise

Apache NiFi Queue Size

avatar

Hi everyone, I hope you’re doing well. I am working on a dataflow in Apache NiFi 1.18, and I need to retrieve the queue size information (flowfile count and content size) directly within NiFi itself, not via an external script or Postman. I know that the NiFi REST API provides this data, and I can access it successfully using external tools. However, my goal is to access queue metrics from inside NiFi, for example through processors like InvokeScriptedProcessor, QueryNiFiReportingTask, or any other built-in mechanism, without sending an external REST API request from outside NiFi. Is there a recommended approach, processor, or reporting task that allows NiFi to read its own queue sizes internally? If not, what would be the best practice to achieve this? Any guidance or examples would be greatly appreciated. Thank you in advance!

3 REPLIES 3

avatar
Community Manager

@hckorkmaz01, Welcome to our community! To help you get the best possible answer, I have tagged in our NiFi experts @MattWho, who may be able to assist you further.

Please feel free to provide any additional information or details about your query. We hope that you will find a satisfactory solution to your question.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Master Mentor

@hckorkmaz01 

There are a few options here:

  1. SiteToSiteStatusReportingTask - Utilizes NiFi's Site-To-Site protocol to send Records to a NiFi Remote Input Port.  It can be configured to send specific component type metrics (Connection) in your case.   The Site-To-Site reporting tasks function as task specific remote process groups for generating and sending FlowFiles to the configured target Remote Input port.
  2. InvokeHTTP processor - Can be used to invoke the rest-api endpoint to get the metrics you want directly in a NiFi dataflow.


Site-To-Site reference documentation:
Admin guide: Site-To-Site Properties (core setup)
User guide: Site-To-Site (user guide)

 

Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

avatar
Visitor

Hi,

Apologies for asking this here, as a new member of the forum I want to post new questions but don't seem to have the ability to do so.  Can someone please explain how I can do this as I want to ask some technical questions about nifi, in particular API queries for provenance.

Thank you.