[Xymon] How to setup a custom script to attempt server logons and other functions
Steve Anderson
steve.anderson at bipsolutions.com
Fri Mar 9 12:25:29 CET 2012
Perl is pretty much perfect for this kind of thing. You do need to install some modules though. CPAN makes life easier.
FTP:
Net::FTP. An example test is attached. It's pretty much the sample code from http://perldoc.perl.org/Net/FTP.html, with a little editing to hook it into Hobbit.
SFTP:
Net::SSH2. http://search.cpan.org/~rkitover/Net-SSH2-0.40/lib/Net/SSH2.pm
WebPages:
LWP::UserAgent if you set it up right, you can hit multiple pages, using a cookie store to maintain cookie based logins.
Steve Anderson
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Don Kuhlman
Sent: 08 March 2012 22:31
To: xymon at xymon.com
Subject: [Xymon] How to setup a custom script to attempt server logons and other functions
Hi folks. I've been googling all day, searching the forums, and looking at other spots but obviously I'm doing something wrong.
I'm trying to now setup some customization in Xymon for business applications.
I want to do it either with a homemade script, download, or using built in features.
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.
Next would be to connect via sFTP and try the same thing.
I'm also trying to do the same kind of tasks with webpages that host applications.
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.
Regards,
Don K
________________________________
This email has been scanned by Westcoastcloud.
http://www.westcoastcloud.com
________________________________
________________________________
BiP Solutions Limited is a company registered in Scotland with Company
Number SC086146 and VAT number 383030966 and having its registered
office at Medius, 60 Pacific Quay, Glasgow, G51 1DZ.
****************************************************************************
This e-mail (and any attachment) is intended only for the attention of
the addressee(s). Its unauthorised use, disclosure, storage or copying
is not permitted. If you are not the intended recipient, please destroy
all copies and inform the sender by return e-mail.
This e-mail (whether you are the sender or the recipient) may be
monitored, recorded and retained by BiP Solutions Ltd.
E-mail monitoring/ blocking software may be used, and e-mail content may
be read at any time.You have a responsibility to ensure laws are not
broken when composing or forwarding e-mails and their contents.
****************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120309/4521eb75/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quicktest.pl
Type: application/octet-stream
Size: 543 bytes
Desc: quicktest.pl
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120309/4521eb75/attachment.obj>
More information about the Xymon
mailing list