Seeing inconsistent agent naming with default settings

Document ID : KB000095612
Last Modified Date : 10/06/2018
Show Technical Document Details
An NSlookup of the ip address of was returning This was changed to return HOSTA in capital letters
Sysview 14.2 build 960 
Agent Release (Build 990200) 
Z/OS 2.2 
With default settings, the agent is picking up the hostname, not the lpar name, unless the hostname is exactly the same as the lpar name.
Things to try:

Removing the parm that is overriding the system name for SYSA and then recycle the the WILYZOS and WILYZOS2 tasks.

Find out which TCP stack (and subsequently IP address and hostname) is being assigned for the WILYZOS2 started task and/or how to assign it to another stack

Overriding the system default behavior by hard coding the hostname in the Agent profile.
introscope.agent.hostName=HOSTA for this example

See  KB000017161  for suggestions
Additional Information:
The Core APM agent acquires hostname by following Java API call "InetAddress.getLocalHost.getCanonicalHostName()", where getLocalHost() returns IP, and getCanonicalHostName() queries hostname for this IP address. 

It explains why duplicated DNS records for the IP address resulted in multiple host names . Also plain IP address could be returned in this erroneous case instead of hostname, if reverted lookup for IP from hostname (to prevent spoofing) fails.  

It should also explain lowercase in host name (returned by DNS resolver as expected, RFC 4343), as not influenced by Java API or APM agent code