<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Thanks everyone for the quick and helpful replies!</div>
<div><br>
</div>
<div>Bruce, could you clarify what you meant about the built in ftp test?  How would you use it to check that an ID/PW can login to the ftp server  and perform a command?</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Don K</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>"White, Bruce" <<a href="mailto:bewhite@fellowes.com">bewhite@fellowes.com</a>><br>
<span style="font-weight:bold">Date: </span>Fri, 9 Mar 2012 09:49:16 -0600<br>
<span style="font-weight:bold">To: </span>Steve Anderson <<a href="mailto:steve.anderson@bipsolutions.com">steve.anderson@bipsolutions.com</a>>, Don Kuhlman <<a href="mailto:don.kuhlman@schawk.com">don.kuhlman@schawk.com</a>>, <<a href="mailto:xymon@xymon.com">xymon@xymon.com</a>><br>
<span style="font-weight:bold">Subject: </span>RE: [Xymon] How to setup a custom script to attempt server logons and other functions<br>
</div>
<div><br>
</div>
<div 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">
<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="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]-->
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; ">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: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; "><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; ">            …..Bruce<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; "><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; "><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 | <a href="mailto:bewhite@fellowes.com">bewhite@fellowes.com</a> |
<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"></font></p>
<div class="WordSection1">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><font face="Arial" size="2"><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">
<a href="mailto:xymon-bounces@xymon.com">xymon-bounces@xymon.com</a> [<a href="mailto:xymon-bounces@xymon.com">mailto:xymon-bounces@xymon.com</a>]
<b>On Behalf Of </b>Steve Anderson<br>
<b>Sent:</b> Friday, March 09, 2012 5:25 AM<br>
<b>To:</b> Don Kuhlman; <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
<b>Subject:</b> Re: [Xymon] How to setup a custom script to attempt server logons and other functions<o:p></o:p></span></font></p>
</div>
</div>
<p class="MsoNormal"><font face="Arial" size="2"><o:p> </o:p></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; ">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></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; ">FTP:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; ">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></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; ">SFTP:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; ">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></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; ">WebPages:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; ">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></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; ">Steve Anderson<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 11pt; color: rgb(31, 73, 125); font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><font face="Arial" size="2"><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span style="font-size: 10pt; 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></font></p>
</div>
</div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"><o:p> </o:p></span></font></p>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">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></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">I'm trying to now setup some customization in Xymon for business applications.<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">I want to do it either with a homemade script, download, or using built in features.<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">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></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">Next would be to connect via sFTP and try the same thing.<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">I'm also trying to do the same kind of tasks with webpages that host applications.<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">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></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">Regards,<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">Don K<o:p></o:p></span></font></p>
</div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; "><o:p> </o:p></span></font></p>
<div align="center" class="MsoNormal" style="text-align:center"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">
<hr align="center" size="2" width="100%">
</span></font></div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">This email has been scanned by Westcoastcloud.<br>
<a href="http://www.westcoastcloud.com">http://www.westcoastcloud.com</a><o:p></o:p></span></font></p>
<div align="center" class="MsoNormal" style="text-align:center"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 10.5pt; color: black; font-family: Calibri, sans-serif; ">
<hr align="center" size="2" width="100%">
</span></font></div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"><o:p> </o:p></span></font></p>
<div align="center" class="MsoNormal" style="text-align:center"><font face="Arial" size="2"><span lang="EN-GB">
<hr align="center" size="2" width="100%">
</span></font></div>
<p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size: 7.5pt; color: gray; font-family: Arial, sans-serif; ">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></font></p>
</div>
<p></p>
</div>
</div>
</span>
</body>
</html>