<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">So a couple things,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                If you run it from within ~xymon/client/bin/xymoncmd you wouldn’t need to set  all those environment variables. Actually, having it run from clientlaunch.cfg would do the same.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                You don’t say what version of Xymon you are using. Is it the Teribithia package?  Is that how things are setup in there? I built my own, and I put the xymon-client variables file in /etc/sysconfig
 which is the standard for RedHat, as opposed to /etc/default which is a debianism.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                Where do you get the CLIENTHOSTNAME variable?   Setting this to `hostname`  got it to work for me from inside xymoncmd.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                /usr/lib/xymon/client or /usr/lib64/xymon/client?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Paul.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Xymon [mailto:xymon-bounces@xymon.com]
<b>On Behalf Of </b>Foster Patch<br>
<b>Sent:</b> Thursday, July 28, 2016 2:05 PM<br>
<b>To:</b> xymon@xymon.com<br>
<b>Subject:</b> [Xymon] RHEL EXT Script Help<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello, I have quite a bit of experience how xymon works in Windows, and recently was given assignments to do some monitoring in Linux. (RHEL 6) Below is my script. It runs with no errors, but my Hobbit page is never propagated with the
 new monitor. I have also gone to /etc/clientlaunch.cfg and put in the necessary lines to run this script. I am at a loss as to what is wrong, and why it will not propagate. Any help? (XYMSRV has an actual IP Address in it)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#!/bin/sh<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">. /etc/default/xymon-client<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">export XYMSRV="xxx.xx.xxx.xx"<o:p></o:p></p>
<p class="MsoNormal">export BBHOME="/usr/lib/xymon/client"<o:p></o:p></p>
<p class="MsoNormal">export OUTSIDENAME="$CLIENTHOSTNAME"<o:p></o:p></p>
<p class="MsoNormal">export BB="${BBHOME}/bin/xymon"<o:p></o:p></p>
<p class="MsoNormal">export BBDISP=$XYMSRV<o:p></o:p></p>
<p class="MsoNormal">export REALMACHINE="`echo $OUTSIDENAME | sed 's/\./,/g'`"<o:p></o:p></p>
<p class="MsoNormal">export TARGETMACHINE="${REALMACHINE}"<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">export TEST="CFENGINE"<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">if [ ! "$TEST" ]; then<o:p></o:p></p>
<p class="MsoNormal">        exit<o:p></o:p></p>
<p class="MsoNormal">fi<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">if [ "${TARGETMACHINE}" == "${REALMACHINE}" ]; then<o:p></o:p></p>
<p class="MsoNormal">LINE="status $REALMACHINE.$TEST green `date`<BR><o:p></o:p></p>
<p class="MsoNormal"><CENTER><I><FONT SIZE=+2><o:p></o:p></p>
<p class="MsoNormal">This machine is not actively running this service in the cluster.<o:p></o:p></p>
<p class="MsoNormal"></FONT></I><o:p></o:p></p>
<p class="MsoNormal"></CENTER><o:p></o:p></p>
<p class="MsoNormal">";<o:p></o:p></p>
<p class="MsoNormal">                # NOW USE THE BB COMMAND TO SEND THE DATA ACROSS<o:p></o:p></p>
<p class="MsoNormal">                #$BB $BBDISP "$LINE"                    # SEND IT TO BBDISPLAY<o:p></o:p></p>
<p class="MsoNormal">                $BB $BBDISP "$LINE"                     # SEND IT TO BBDISPLAY<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">        fi<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:2.0pt;margin-right:0in;margin-bottom:2.0pt;margin-left:0in;text-autospace:none">
<span style="font-size:13.5pt;font-family:"Arial","sans-serif";color:#FF6600">Foster Patch</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:2.0pt;margin-right:0in;margin-bottom:2.0pt;margin-left:0in;text-autospace:none">
<span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:black">Server Technician</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:2.0pt;margin-right:0in;margin-bottom:2.0pt;margin-left:0in;text-autospace:none">
<span style="font-size:13.5pt;font-family:"Arial","sans-serif";color:#FF6600">AccuWeather</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:2.0pt;margin-right:0in;margin-bottom:2.0pt;margin-left:0in;text-autospace:none">
<span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:black">385 Science Park Road, State College, PA 16803</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:2.0pt;margin-right:0in;margin-bottom:2.0pt;margin-left:0in;text-autospace:none">
<span style="font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black">P: 814.235.8650</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:2.0pt;margin-right:0in;margin-bottom:2.0pt;margin-left:0in;text-autospace:none">
<span style="font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black">E: </span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1F497D"><a href="mailto:Foster.Patch@accuweather.com"><span style="color:blue">Foster.Patch@accuweather.com</span></a></span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:2.0pt;margin-right:0in;margin-bottom:2.0pt;margin-left:0in;text-autospace:none">
<span style="font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black">E: </span><span style="color:#1F497D"><a href="mailto:networkoperations@accuweather.com"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:blue">networkoperations@accuweather.com</span></a><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:2.0pt;margin-right:0in;margin-bottom:2.0pt;margin-left:0in;text-autospace:none">
<span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#ED7D31"><a href="http://www.accuweather.com/"><span style="color:#ED7D31">http://www.AccuWeather.com</span></a></span><span style="color:#ED7D31"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<center>This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately
 notify the sender by reply e-mail and destroy all copies of the communication and any attachments.</center>
</body>
</html>