<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: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)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 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;}
/* 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:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Helvetica","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">You can start with the help files, specifically:
<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"><a href="http://www.xymon.com/xymon/help/xymon-tips.html#scripts">http://www.xymon.com/xymon/help/xymon-tips.html#scripts</a><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">This shows about custom scripts. For me, the easiest way is to install a xymon client on the system you want to run this test on, then setup that client to do the test, see the clientlaunch.cfg file in the xymon
 client home etc directory. You add your test there, as in:<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">[dguard]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                CMD /bin/sh $XYMONCLIENTHOME/ext/dguard.sh
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                INTERVAL 5m<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">So that script needs to run as the xymon user, so you need to test using that account. Then,  add whatever you call that test to the monitored host in the hosts.cfg (ie 10.1.2.35   hostname.domain    # ftp smtp
 dns mytest ).<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">The other way of doing it is to run everything from the xymon server, in this case you’d ssh (or however) to the host and run the command and return the results. It just depends on how you want to set up your
 xymon environment. <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 may in fact be able to get whatever you are testing for from the xymon client – it does have a lot of state information to choose from.<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">Hope this helps,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-AU" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">Phil Crooker
</span></b><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>John Kramer<br>
<b>Sent:</b> Tuesday, August 20, 2013 6:40 AM<br>
<b>To:</b> xymon@xymon.com<br>
<b>Subject:</b> [Xymon] Xymon Cron Question<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif"">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif"">Very new to Xymon here, so I apologize if this is a newb question.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif"">We have a test script that  runs as cron and inspects the state of the system (returns 0 for success, returns non 0 for failure).  We would like to report the result of that test through
 Xymon.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif"">Any help as to how to do this would be appreciated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif"">Thanks!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif"">John Kramer<span style="color:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"><b><span style="font-family:"Helvetica","sans-serif"">Product Manager – Enterprise Security Solutions<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif";color:#1F497D"><a href="mailto:John.Kramer@comodo.com">John.Kramer@comodo.com</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif"">Mobile: 314.435.2370<span style="color:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif"">Skype: john.kramer_comodo<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Helvetica","sans-serif";color:#1F497D"><a href="http://www.comodo.com/">http://www.comodo.com</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><img border="0" width="157" height="75" id="Picture_x0020_1" src="cid:image001.jpg@01CE9D83.3AFF2780" alt="Description: Description: https://www.thesslstore.com/images/partner-comodo-logo.jpg"></span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>