Support Questions
Find answers, ask questions, and share your expertise

How to get hostname of a bulletin rather than the bulletinNodeId?

Contributor

I am developing a flow where I need the hostname of where a bulletin is coming from. Currently, a large portion of my flow is getting this by me first manually determining what hostname is associated with which bulletinNodeId, and then using the RouteOnAttribute processor to map this to the actual hostname. This isn't going to be scalable if I need to first manually determine which bulletinNodeId is associated with which hostname. Is there a better way to go about getting this hostname?

1 ACCEPTED SOLUTION

Super Guru

Unfortunately at the time of this answer, that field is not being populated by the framework and thus doesn't show up in the output. I have written NIFI-5155 to cover this improvement. Please feel free to comment on the Jira case as to whether you'd like to see the IP, hostname, or both, thanks in advance!

View solution in original post

4 REPLIES 4

Super Guru

There's a bulletinNodeAddress field, it's probably an IP not a hostname (I didn't check), would that work?

Contributor

@Matt Burgess This would be better as it would be easier to map the hostname but still not a perfect solution. Also, I didn't see this as a field in the bulletin's JSON. I'm currently running HDF 3.0.1 (NiFi 1.2) so I'm assuming it's not in my version?

Super Guru

Unfortunately at the time of this answer, that field is not being populated by the framework and thus doesn't show up in the output. I have written NIFI-5155 to cover this improvement. Please feel free to comment on the Jira case as to whether you'd like to see the IP, hostname, or both, thanks in advance!

Contributor

@Matt Burgess

Thanks for opening the JIRA Matt. As a workaround in the meantime, I discovered I can use ${s2s.host} to get the host name, I just then need to use an UpdateAttribute processor to add this as an actual property to the flowfile.

; ;