<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head><body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>No, that made no difference - "10.11.12.13   FQDN    hostname" is the default order <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">in SuSE</span>, anyway... Interesting.<br>
</p>
<p><br>
</p>
<p>cheers, P<br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri; font-size:12pt"><span lang="en-AU">
<div style="margin:14pt 0 10pt 0">
<hr tabindex="-1" style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; display: inline-block; width: 98%;">
<br>
</div>
</span></div>
</div>
<div style="color: rgb(33, 33, 33);">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Ralph Mitchell <ralphmitchell@gmail.com><br>
<b>Sent:</b> Saturday, 3 February 2018 3:24 AM<br>
<b>To:</b> Phil Crooker<br>
<b>Cc:</b> xymon@xymon.com<br>
<b>Subject:</b> Re: [Xymon] xymon client host name not including domain name in systemd scripts</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>FYI, my experience with RHEL5 was, if the /etc/hosts file had the short-form host name first, that's what the Xymon client used.  Switching it around to put the FQDN name first fixed it.  Didn't need to modify the Xymon script at all.  Kinda ridiculous,
 I know...<br>
<br>
</div>
i.e.  This checked in to Xymon as "server"<br>
</div>
     10.12.34.56    server   <a href="http://server.domain.com">server.domain.com</a><br>
<br>
</div>
And this checked in as "<a href="http://server.domain.com">server.domain.com</a>"<br>
<br>
</div>
     10.12.34.56   <a href="http://server.domain.com">server.domain.com</a>   server<br>
<br>
</div>
<div>Dunno if the same thing happens in SuSE, though.<br>
<br>
</div>
Ralph Mitchell<br>
<br>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Feb 2, 2018 at 2:01 AM, Phil Crooker <span dir="ltr">
<<a href="mailto:Phil.Crooker@orix.com.au" target="_blank">Phil.Crooker@orix.com.au</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" style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>I've this issue with SUSE linux - SUSE just returns the plain hostname  without the domain when it uses uname -n -- the xymon client then doesn't match the FQDN in the xymon hosts.cfg file, the entry goes purple and the client ends up in the ghost report.
 I'm compiling my own client and inserting the xymonlaunch.service file in /etc/systemd/system, etc -- somehow it doesn't send the correct hostname. I tried adding CLIENTNAME=<a href="http://blah.domain.com" target="_blank">blah.domain.com</a> in xymonlaunch
 to no effect (also put it in the xymonclient config file, still no good). If I manually run /bin/hostname with the FQDN, that works, but is lost on the next reboot. And yes I ensured the FQDN is in /etc/hostname, etc... I do not want to have to put in a "CLIENT:whatever" statement
 in hosts.cfg for every host with a client, which works but is inelegant to me.<br>
</p>
<p><br>
</p>
<p>Looking at the old runclient.sh script that comes with the client (and is not used with systemd), the MACHINEDOTS variable is set before launch. In the good ol SYS5 init.d days, I used to insert MACHINEDOTS=`hostname -f` in the runclient.sh script, which
 worked. So, I found if you run: systemctl edit xymonlaunch.service and add the following, it works:<br>
</p>
<p><br>
</p>
<p>    [Service]<br>
</p>
<p>    Environment="MACHINEDOTS=<a href="http://whatever.domain.com" target="_blank">w<wbr>hatever.domain.com</a>"<br>
</p>
<p><br>
</p>
<p>This creates a /etc/systemd/system/<wbr>xymonlaunch.service.d/<wbr>override.conf file and all is well. Unfortunately it doesn't work with `hostname -f`. There is a warning that if there is no override.conf in whatever.service.d/ the service won't run. That
 isn't true with SUSE SLES 12, it works fine w/o it (less the correct name, of course), but YMMV...<br>
</p>
<p><br>
</p>
<p>HTH Someone, Phil<br>
</p>
<div id="m_1539209923897749751Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri; font-size:12pt"><span lang="en-AU"></span></div>
</div>
<br>
<br>
<p style="font-family:Verdana; font-size:10pt; color:#666666"><b>Disclaimer</b></p>
<p style="font-family:Verdana; font-size:8pt; color:#666666">The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you
 are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.<br>
<br>
This email has been scanned for viruses and malware, and may have been automatically archived by
<b>Mimecast Ltd</b>, an innovator in Software as a Service (SaaS) for business. Providing a
<b>safer</b> and <b>more useful</b> place for your human generated data. Specializing in; Security, archiving and compliance. To find out more
<a href="http://www.mimecast.com/products/" target="_blank">Click Here</a>.</p>
</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>
</div>
</div>


<table style="width: 650px;" width="650">
        <tbody><tr>
                <td valign="top" width="185" style="vertical-align: top; width: 185px;">
                        <img src="http://web.orix.com.au/_resource/email/email-banner.jpg?rnd=201703091" width="151" style="width: 151px;" />
                </td>
                <td valign="top" style="vertical-align: top;">
                        <div style="background-color: #1F2A6B; width: 465px; height: 30px; margin: 10px 0 15px 0; float: left;"></div>
                        <div style="font: normal 9px Arial, Helvetica, Sans-serif; color: #949494;">
                                <p></p><h1 style="font-size: 11px; font-weight: bold; padding: 0; margin: 0;">Please consider the environment before printing this e-mail</h1><p></p>
                                <p style="padding: 0; margin: 0; text-align: justify;">This message from ORIX Australia may contain confidential and/or privileged information. If you are not the intended recipient, any use, disclosure or copying of this message (or of any attachments to it) is not authorised. If you have received this message in error, please notify the sender immediately and delete the message and any attachments from your system. Please inform the sender if you do not wish to receive further communications by email.</p> 
                                <p>ORIX has a Privacy Policy which outlines what kinds of personal information we collect and hold, how we may collect and handle it, and your rights regarding personal information. Please let us know if you would like a copy. The Privacy Policy and a Collection Statement are also available on our <a href="http://www.orix.com.au" style="color: #949494;" target="_blank">website</a>.</p>
                 
                                <p>We do not accept liability for any loss or damage caused by any computer viruses or defects that may be transmitted with this message. We recommend you carry out your own checks for viruses or defects.</p>
                        </div>
                </td>
        </tr>
</tbody></table></body></html>