Hey Ralph,
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.
=G=
On Fri, Sep 15, 2017 at 8:38 PM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>
wrote:
I've had clients check in with the short-form name when it's listed first
in the /etc/hosts file, like this:
10.10.10.10 client client.domain.com
Just swapping the names over fixed it and made it check in with the
long-form name:
10.10.10.10 client.domain.com client
Not sure why.
Ralph Mitchell
On Fri, Sep 15, 2017 at 7:44 PM, Josh Luthman <user-4c45a83f15cb@xymon.invalidwrote:
Either uname on the client or hosts config on the server.
Josh Luthman
Office: XXX-XXX-XXXX <(937)%20552-2340>
Direct: XXX-XXX-XXXX <(937)%20552-2343>
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
On Sep 15, 2017 7:35 PM, "John Thurston" <user-ce4d79d99bab@xymon.invalid>
wrote:
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.
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:
client xymonx.linux linux
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.
The xymon server reports my client messages as 'ghosts', and correctly
picks them up if I put a client alias in hosts.cfg
client:xymonx
I'd like to do away with that alias.
Where is my linux client picking up this short name?
--
Do things because you should, not just because you can.
John Thurston XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska