<div dir="ltr">Hey Ralph,<div><br></div><div>I'm fairly certain (not 100%) that 'gethostbyname' (apparently being deprecated in favor of getnameinfo) will only return the first entry from the hosts file.  I've been bitten by this for some other apps.</div><div><br></div><div>=G=</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 15, 2017 at 8:38 PM, Ralph Mitchell <span dir="ltr"><<a href="mailto:ralphmitchell@gmail.com" target="_blank">ralphmitchell@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I've had clients check in with the short-form name when it's listed first in the /etc/hosts file, like this:<div><br></div><div>     10.10.10.10    client  <a href="http://client.domain.com" target="_blank">client.domain.com</a></div><div class="gmail_extra"><br></div><div class="gmail_extra">Just swapping the names over fixed it and made it check in with the long-form name:</div><div class="gmail_extra"><br></div><div class="gmail_extra">     10.10.10.10  <a href="http://client.domain.com" target="_blank">client.domain.com</a>  client</div><div class="gmail_extra"><br></div><div class="gmail_extra">Not sure why.</div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra"><br></div><div class="gmail_extra">Ralph Mitchell</div></font></span><div><div class="h5"><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 15, 2017 at 7:44 PM, Josh Luthman <span dir="ltr"><<a href="mailto:josh@imaginenetworksllc.com" target="_blank">josh@imaginenetworksllc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Either uname on the client or hosts config on the server.<span class="m_5693917026658393980HOEnZb"><font color="#888888"><br><br><div data-smartmail="gmail_signature">Josh Luthman<br>Office: <a href="tel:(937)%20552-2340" value="+19375522340" target="_blank">937-552-2340</a><br>Direct: <a href="tel:(937)%20552-2343" value="+19375522343" target="_blank">937-552-2343</a><br>1100 Wayne St<br>Suite 1337<br>Troy, OH 45373</div></font></span></div><div class="m_5693917026658393980HOEnZb"><div class="m_5693917026658393980h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sep 15, 2017 7:35 PM, "John Thurston" <<a href="mailto:john.thurston@alaska.gov" target="_blank">john.thurston@alaska.gov</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's been a couple of years since I've needed to configure a linux client (my Solaris systems are still running their old BB clients). And I'm confused with what I'm seeing. This is on a _very_ minimal server installation with client; compiled from source.<br>
<br>
I have files in ~/client/tmp/ of the form msg.xymonx.state.ak.us.txt (so fully-qualified host.domain name). Yet the first line of that file is:<br>
  client xymonx.linux linux<br>
<br>
So the message body being sent to the xymon server contains the short host name. But the client is writing the file onto the disk with the fully-qualified name.<br>
<br>
The xymon server reports my client messages as 'ghosts', and correctly picks them up if I put a client alias in hosts.cfg<br>
  client:xymonx<br>
I'd like to do away with that alias.<br>
<br>
Where is my linux client picking up this short name?<br>
<br>
-- <br>
   Do things because you should, not just because you can.<br>
<br>
John Thurston    <a href="tel:907-465-8591" value="+19074658591" target="_blank">907-465-8591</a><br>
<a href="mailto:John.Thurston@alaska.gov" target="_blank">John.Thurston@alaska.gov</a><br>
Department of Administration<br>
State of Alaska<br>
______________________________<wbr>_________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com" target="_blank">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman<wbr>/listinfo/xymon</a><br>
</blockquote></div></div>
</div></div><br>______________________________<wbr>_________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com" target="_blank">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman<wbr>/listinfo/xymon</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>______________________________<wbr>_________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/<wbr>mailman/listinfo/xymon</a><br>
<br></blockquote></div><br></div>