<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.E-MailFormatvorlage17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
span.SpellE
        {}
.MsoChpDefault
        {}
@page WordSection1
        {margin:70.85pt 70.85pt 2.0cm 70.85pt}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="">
<div class="WordSection1">
<p class="MsoNormal">Hello out there,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Perhaps there’s anybody else using alerts:html_mail1.2 which is available from
<a href="http://xymonton.org/alerts:html_mail1.2"><span style="color:windowtext; text-decoration:none">http://xymonton.org/alerts:html_mail1.2</span></a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I’ve set it up and <span class="SpellE">i’ve</span> done some changes to the way it sends the subject and the body. All of this is working fine.</p>
<p class="MsoNormal">There’s one thing that makes me wonder and I’ve tried a bit for me, but I’m concerned why I cannot get this to work.</p>
<p class="MsoNormal">The body of the <span class="SpellE">eMails</span> coming from the
<span class="SpellE">perl</span> script contains a link to the affected host, for example:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><a href="http://XYMONHOST/xymon-cgi/bb-hostsvc.sh?HOST=testhost&SERVICE=http"><span style="color:windowtext; text-decoration:none">http://XYMONHOST/xymon-cgi/bb-hostsvc.sh?HOST=testhost&SERVICE=http</span></a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">But I need to have the link as follows:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><a href="http://XYMONHOST.FULL-QUALIFIED-DOMAIN/xymon-cgi/bb-hostsvc.sh?HOST=testhost&SERVICE=http"><span style="color:windowtext; text-decoration:none">http://XYMONHOST.FULL-QUALIFIED-DOMAIN/xymon-cgi/bb-hostsvc.sh?HOST=testhost&SERVICE=http</span></a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">This is due to the fact that we do monitoring for different customers having their
<span class="SpellE">Xymon</span> servers with different domain names.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">For example, we have a <span class="SpellE">Xymon</span> server xymonA.domainA.org and another one called xymonB.domainB.org.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Therefore I need the fully qualified hostname in the link.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">While reviewing the <span class="SpellE">perl</span> code of the script I recognized a section “Retrieve the data from the environment variables”.</p>
<p class="MsoNormal">Within there I inserted a line</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">$BBSERVERHOSTNAME = $ENV{‘BBSERVERHOSTNAME’} || “”;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The syntax is the same as for the other variables. Then I changed the line containing the subject for the
<span class="SpellE">eMail</span> to contain this variable instead of $BBSERVERWWWNAME.</p>
<p class="MsoNormal">As last step I changed the setting for the XYMONSERVERHOSTNAME (which is also set as BBSERVERHOSTNAME) in xymonserver.cfg.
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">After restarting the <span class="SpellE">xymon</span> services and the
<span class="SpellE">webserver</span> I’m still getting <span class="SpellE">eMails</span> containing the link WITHOUT having the fully qualified hostname.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I’m NOT getting entries in /<span class="SpellE">var</span>/log/<span class="SpellE">xymon</span>/alert.log saying that the variable $BBSERVERHOSTNAME is uninitialized.</p>
<p class="MsoNormal">When commenting out the line</p>
<p class="MsoNormal">$BBSERVERHOSTNAME = $ENV{‘BBSERVERHOSTNAME’} || “”;</p>
<p class="MsoNormal">in the <span class="SpellE">perl</span> script, then I get this message.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">For me this means, that I might have done the most things the right way; didn’t
<span class="SpellE">i</span>? Anybody out there having an idea?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Sorry if my <span class="SpellE">english</span> isn’t at 100%....</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif"; color:#D8D8BF"> </span></p>
<p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif"; color:#D8D8BF"> </span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="line-height:12.0pt"><b style=""><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">CHRISTIAN BECKER</span></b></p>
<p class="MsoNormal" style="line-height:12.0pt"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">System Engineer</span></p>
<p class="MsoNormal" style="line-height:12.0pt"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">CSC</span></p>
<p class="MsoNormal" style="line-height:12.0pt"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
<p class="MsoNormal" style="line-height:12.0pt"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">August-Horch-Strasse 28, 56070 Koblenz, Germany</span></p>
<p class="MsoNormal"> </p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="2"><br>
CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract
 unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Deutschland Services GmbH • Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany • Board of Directors: Gerhard
 Fercho (Chairman),Thomas Nebe, Peter Schmidt • Registered in Germany: HRB 7574, Wiesbaden<br>
</font>
</body>
</html>