Where is the linux client name set?
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 907-465-8591 John.Thurston at alaska.gov Department of Administration State of Alaska
Either uname on the client or hosts config on the server.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
On Sep 15, 2017 7:35 PM, "John Thurston" <john.thurston at alaska.gov> 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 907-465-8591 John.Thurston at alaska.gov Department of Administration State of Alaska
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
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 <josh at imaginenetworksllc.com> wrote:
Either uname on the client or hosts config on the server.
Josh Luthman Office: 937-552-2340 <(937)%20552-2340> Direct: 937-552-2343 <(937)%20552-2343> 1100 Wayne St Suite 1337 Troy, OH 45373
On Sep 15, 2017 7:35 PM, "John Thurston" <john.thurston at alaska.gov> 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 907-465-8591 John.Thurston at alaska.gov Department of Administration State of Alaska
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
On 9/15/2017 4:38 PM, Ralph Mitchell 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.comJust swapping the names over fixed it and made it check in with the long-form name:
10.10.10.10 client.domain.com client
That's a good idea, but mine is already ip fqdn hostname
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Department of Administration State of Alaska
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 <ralphmitchell at gmail.com> 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.comJust swapping the names over fixed it and made it check in with the long-form name:
10.10.10.10 client.domain.com clientNot sure why.
Ralph Mitchell
On Fri, Sep 15, 2017 at 7:44 PM, Josh Luthman <josh at imaginenetworksllc.com
wrote:
Either uname on the client or hosts config on the server.
Josh Luthman Office: 937-552-2340 <(937)%20552-2340> Direct: 937-552-2343 <(937)%20552-2343> 1100 Wayne St Suite 1337 Troy, OH 45373
On Sep 15, 2017 7:35 PM, "John Thurston" <john.thurston at alaska.gov> 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 907-465-8591 John.Thurston at alaska.gov Department of Administration State of Alaska
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
John,
Which version and flavor of linux?
=G=
On Fri, Sep 15, 2017 at 7:35 PM, John Thurston <john.thurston at alaska.gov> 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 907-465-8591 John.Thurston at alaska.gov Department of Administration State of Alaska
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
On 9/16/2017 7:25 PM, Galen Johnson wrote:
John,
Which version and flavor of linux?
CentOS 7
uname -a
Linux xymonx 2.6.32-042stab120.3 #1 SMP Thu Oct 20 18:18:21 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Department of Administration State of Alaska
I'm on RHEL 6 which is probably the same.
In /etc/sysconfig/xymon-client there is a CLIENTHOSTNAME= line.
HTH
Jeremy
On 18 Sep 2017 17:13, "John Thurston" <john.thurston at alaska.gov> wrote:
On 9/16/2017 7:25 PM, Galen Johnson wrote:
John,
Which version and flavor of linux?
CentOS 7
uname -a
Linux xymonx 2.6.32-042stab120.3 #1 SMP Thu Oct 20 18:18:21 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Department of Administration State of Alaska
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
On 9/18/2017 8:30 AM, Jeremy Ruffer wrote:
I'm on RHEL 6 which is probably the same.
In /etc/sysconfig/xymon-client there is a CLIENTHOSTNAME= line.
Are you, perhaps, running the terabitha package of Xymon? I have no such file here. As mentioned earlier, I've compiled from source.
For my machine, I have borrowed the terabithia systemd service-file. It fires off xymonlaunch with:
ExecStart=/opt/xymon/server/bin/xymoncmd /opt/xymon/server/bin/xymonlaunch --no-daemon $XYMONLAUNCHOPTS
My tasks.cfg has the client to be run with:
ENVFILE /opt/xymon/client/etc/xymonclient.cfg CMD /opt/xymon/client/bin/xymonclient.sh LOGFILE $XYMONSERVERLOGS/xymonclient.log INTERVAL 5m
The xymonclient.sh contains the pertinent line:
echo "client $MACHINE.$SERVEROSTYPE $CONFIGCLASS" >> $MSGTMPFILE
When I change $MACHINE to $MACHINEDOTS, the client behaves as expected, and sends messages under its fully qualified domain name.
It looks to me like the behavior of uname on my host isn't relevant. The xymonclient.sh is specifically writing the short name rather than the long.
Now what isn't clear to me, is where $MACHINE is picking up the short name. I had expected it to hold the old-school "comma name". The only place I can fine $MACHINE being assigned a value is in runclient.sh. As far as I can tell, my chain of commands does not invoke that script but goes straight for xymonclient.sh.
Right now, it looks like I have two options: A) Modify xymonclient.sh to use MACHINEDOTS B) Use a CLIENT tag in my hosts.cfg to accept the short name
I dislike the use of CLIENT tags, but in this case prefer it to remembering to patch the client script if I ever rebuild my software.
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Department of Administration State of Alaska
I run all my systems on Centos 7 (now) and, IIRC, I had to run
hostnamectl set-hostname <fqdn>
Something to try.
=G=
On Mon, Sep 18, 2017 at 1:30 PM, John Thurston <john.thurston at alaska.gov> wrote:
On 9/18/2017 8:30 AM, Jeremy Ruffer wrote:
I'm on RHEL 6 which is probably the same.
In /etc/sysconfig/xymon-client there is a CLIENTHOSTNAME= line.
Are you, perhaps, running the terabitha package of Xymon? I have no such file here. As mentioned earlier, I've compiled from source.
For my machine, I have borrowed the terabithia systemd service-file. It fires off xymonlaunch with:
ExecStart=/opt/xymon/server/bin/xymoncmd /opt/xymon/server/bin/xymonlaunch
--no-daemon $XYMONLAUNCHOPTS
My tasks.cfg has the client to be run with:
ENVFILE /opt/xymon/client/etc/xymonclient.cfg CMD /opt/xymon/client/bin/xymonclient.sh LOGFILE $XYMONSERVERLOGS/xymonclient.log INTERVAL 5m
The xymonclient.sh contains the pertinent line:
echo "client $MACHINE.$SERVEROSTYPE $CONFIGCLASS" >> $MSGTMPFILE
When I change $MACHINE to $MACHINEDOTS, the client behaves as expected, and sends messages under its fully qualified domain name.
It looks to me like the behavior of uname on my host isn't relevant. The xymonclient.sh is specifically writing the short name rather than the long.
Now what isn't clear to me, is where $MACHINE is picking up the short name. I had expected it to hold the old-school "comma name". The only place I can fine $MACHINE being assigned a value is in runclient.sh. As far as I can tell, my chain of commands does not invoke that script but goes straight for xymonclient.sh.
Right now, it looks like I have two options: A) Modify xymonclient.sh to use MACHINEDOTS B) Use a CLIENT tag in my hosts.cfg to accept the short name
I dislike the use of CLIENT tags, but in this case prefer it to remembering to patch the client script if I ever rebuild my software.
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Department of Administration State of Alaska
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
On 09/18/2017 09:30 AM, Jeremy Ruffer wrote:
If you are asking for where the system stores the hostname then it is in /etc/hostname
I'm on RHEL 6 which is probably the same.
In /etc/sysconfig/xymon-client there is a CLIENTHOSTNAME= line.
HTH
Jeremy
On 18 Sep 2017 17:13, "John Thurston" <john.thurston at alaska.gov> wrote:
On 9/16/2017 7:25 PM, Galen Johnson wrote:
John,
Which version and flavor of linux?
CentOS 7
uname -a
Linux xymonx 2.6.32-042stab120.3 #1 SMP Thu Oct 20 18:18:21 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Department of Administration State of Alaska
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
-- Stephen Carville Serf Without Portfolio 800.537.3821 x1326 scarville at nospam.lereta.com
There is no "I" in Team but there is in Integrity.
participants (6)
-
jeremy.ruffer@gmail.com
-
john.thurston@alaska.gov
-
josh@imaginenetworksllc.com
-
ralphmitchell@gmail.com
-
scarville@lereta.com
-
solitaryr@gmail.com