<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word"><head><META content="text/html; charset=utf-8" http-equiv="Content-Type">

<STYLE><!--         /* Style Definitions */         p.33a9b233-86eb-4960-9909-eca4040c815e, li.33a9b233-86eb-4960-9909-eca4040c815e, div.33a9b233-86eb-4960-9909-eca4040c815e, table.33a9b233-86eb-4960-9909-eca4040c815eTable         {margin:0cm;    margin-bottom:.0001pt;}        div.Section1        {page:Section1;}        --> <!--          #33a9b233-86eb-4960-9909-eca4040c815eexcontact a{color:white;text-decoration:none;}          #33a9b233-86eb-4960-9909-eca4040c815eexcontact a:hover{text-decoration:underline;}          --></STYLE>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type><meta content="Microsoft Word 14 (filtered medium)" name=Generator><!--[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: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:12.0pt;
        font-family:"Times New Roman","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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
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.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.w
        {mso-style-name:w;}
span.sc
        {mso-style-name:sc;}
span.i
        {mso-style-name:i;}
span.s
        {mso-style-name:s;}
span.q
        {mso-style-name:q;}
span.cm
        {mso-style-name:cm;}
span.n
        {mso-style-name:n;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle29
        {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><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The built in “ftp” test will check that ftp is up and accepting commands.   You won’t need to create a special user or embed a password in some script.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>            …..Bruce<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div></div></div> 
<P CLASS="33a9b233-86eb-4960-9909-eca4040c815e"> </P>
<P CLASS="33a9b233-86eb-4960-9909-eca4040c815e"><FONT FACE="Arial"><FONT SIZE="2"><FONT COLOR="#999999"><FONT COLOR="#000000"><STRONG>Bruce<FONT COLOR="#808080"><FONT COLOR="#000000"> White</FONT></FONT></STRONG></FONT></FONT></FONT></FONT></P>
<P CLASS="33a9b233-86eb-4960-9909-eca4040c815e"><FONT FACE="Arial"><FONT SIZE="2"><FONT COLOR="#808080">Senior Enterprise Systems Engineer | Phone: 1-630-671-5169 | Fax: 630-893-1648 | bewhite@fellowes.com | <A HREF="http://www.fellowes.com/">www.fellowes.com</A></FONT></FONT></FONT></P>
<P CLASS="33a9b233-86eb-4960-9909-eca4040c815e"><FONT FACE="Arial" SIZE="2"></FONT> </P>
<P CLASS="33a9b233-86eb-4960-9909-eca4040c815e"><IMG ALIGN="baseline" ALT="" BORDER="0" HSPACE="0" SRC="cid:fellbrand1.jpg@fece75cf.c6184add"> </P>
<P CLASS="33a9b233-86eb-4960-9909-eca4040c815e"><FONT FACE="Arial" SIZE="2"></FONT> </P>
<P CLASS="33a9b233-86eb-4960-9909-eca4040c815e"><FONT SIZE="+0"></FONT><STRONG></STRONG><FONT SIZE="+0"></FONT><FONT SIZE="+0"></FONT><FONT SIZE="+0"></FONT><FONT COLOR="#808080" FACE="Arial" SIZE="1">Disclaimer: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Fellowes, Inc.</FONT></P>
<P CLASS="33a9b233-86eb-4960-9909-eca4040c815e"><FONT FACE="Arial" SIZE="2"></FONT> </P>
<P CLASS="33a9b233-86eb-4960-9909-eca4040c815e"><FONT FACE="Arial" SIZE="2"><div class=WordSection1><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-bounces@xymon.com [mailto:xymon-bounces@xymon.com] <b>On Behalf Of </b>Steve Anderson<br><b>Sent:</b> Friday, March 09, 2012 5:25 AM<br><b>To:</b> Don Kuhlman; xymon@xymon.com<br><b>Subject:</b> Re: [Xymon] How to setup a custom script to attempt server logons and other functions<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Perl is pretty much perfect for this kind of thing. You do need to install some modules though. CPAN makes life easier.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>FTP:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Net::FTP. An example test is attached. It’s pretty much the sample code from <a href="http://perldoc.perl.org/Net/FTP.html">http://perldoc.perl.org/Net/FTP.html</a>, with a little editing to hook it into Hobbit.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>SFTP:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Net::SSH2. <a href="http://search.cpan.org/~rkitover/Net-SSH2-0.40/lib/Net/SSH2.pm">http://search.cpan.org/~rkitover/Net-SSH2-0.40/lib/Net/SSH2.pm</a> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>WebPages:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>LWP::UserAgent if you set it up right, you can hit multiple pages, using a cookie store to maintain cookie based logins.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Steve Anderson<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";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"'> <a href="mailto:xymon-bounces@xymon.com">xymon-bounces@xymon.com</a> <a href="mailto:[mailto:xymon-bounces@xymon.com]">[mailto:xymon-bounces@xymon.com]</a> <b>On Behalf Of </b>Don Kuhlman<br><b>Sent:</b> 08 March 2012 22:31<br><b>To:</b> <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br><b>Subject:</b> [Xymon] How to setup a custom script to attempt server logons and other functions<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'>Hi folks. I've been googling all day, searching the forums, and looking at other spots but obviously I'm doing something wrong.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'>I'm trying to now setup some customization in Xymon for business applications.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'>I want to do it either with a homemade script, download, or using built in features.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'>My first task is to try and login to an ftp server using a test id and password to verify it is up and accepting connections.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'>Next would be to connect via sFTP and try the same thing.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'>I'm also trying to do the same kind of tasks with webpages that host applications.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'>Can someone point me to the best way to do this from our Xymon server, and if there are code snips of how to make an ftp connection, send an ID, Password, and then quit, I would really appreciate knowing where to find them.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'>Regards,<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'>Don K<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p><div align=center class=MsoNormal style='text-align:center'><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><hr align=center size=2 width="100%"></span></div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'>This email has been scanned by Westcoastcloud.<br><a href="http://www.westcoastcloud.com">http://www.westcoastcloud.com</a><o:p></o:p></span></p><div align=center class=MsoNormal style='text-align:center'><span lang=EN-GB style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:black'><hr align=center size=2 width="100%"></span></div><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><div align=center class=MsoNormal style='text-align:center'><span lang=EN-GB><hr align=center size=2 width="100%"></span></div><p class=MsoNormal><span lang=EN-GB style='font-size:7.5pt;font-family:"Arial","sans-serif";color:gray'>BiP Solutions Limited is a company registered in Scotland with Company<br>Number SC086146 and VAT number 383030966 and having its registered<br>office at Medius, 60 Pacific Quay, Glasgow, G51 1DZ.<br><br>****************************************************************************<br>This e-mail (and any attachment) is intended only for the attention of<br>the addressee(s). Its unauthorised use, disclosure, storage or copying<br>is not permitted. If you are not the intended recipient, please destroy<br>all copies and inform the sender by return e-mail.<br>This e-mail (whether you are the sender or the recipient) may be<br>monitored, recorded and retained by BiP Solutions Ltd.<br>E-mail monitoring/ blocking software may be used, and e-mail content may<br>be read at any time.You have a responsibility to ensure laws are not<br>broken when composing or forwarding e-mails and their contents.<br>****************************************************************************</span><span lang=EN-GB><o:p></o:p></span></p></div></FONT></P></BODY></HTML>