Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

How does the input port know which device data is coming from?

Expert Contributor

Hi, i have been looking at some tutorials of Minifi. I am a little confused as to how the NiFi server knows where the data is coming from if you have multiple minifi agents sending data to the same remote process group. On the server, the input port is ingesting data from these devices, how does it tell which data came from a particular device?

Thanks

1 ACCEPTED SOLUTION

Expert Contributor

Hi @Roger Young,

Haven't played with Minifi but with Nifi in general source origin is a Flow File attribute which you can find under the Attributes tab when viewing a Flow File under the data provenance menu.

/Best regards, Mats

View solution in original post

4 REPLIES 4

Expert Contributor

Hi @Roger Young,

Haven't played with Minifi but with Nifi in general source origin is a Flow File attribute which you can find under the Attributes tab when viewing a Flow File under the data provenance menu.

/Best regards, Mats

Expert Contributor

ok thank you.

There are currently a couple of options...

If you just want to figure out where a flow file came from for troubleshooting/debugging, then using provenance can tell you this by looking at the transit URI of the RECEIVE event.

If you want to make a decision somewhere in your NiFi flow based on which MiNiFi sent the flow file, then currently you would need set an attribute on the MiNiFi side like "minifi.host = ${hostname()}" in an UpdateAttribute processor, so that when it got transferred to NiFi that attribute would be there.

There is a pull request open to make NiFi automatically create this attribute for you when receiving the flow files via site-to-site, so basically the same info that is available on the RECEIVE event would be available in attributes:

https://issues.apache.org/jira/browse/NIFI-2585

https://github.com/apache/nifi/pull/1320

Expert Contributor

Thank you for the reply, much appreciated.