Re: quick and dirty Netsaint plugins with Perl question

Stanley Hopcroft <[email protected]>
Newsgroups gmane.network.netsaint.user
Message-ID <[email protected]>
Dear Sir,

On Mon, Nov 18, 2002 at 03:25:26PM -0600, Threet, Robert A wrote:
> I've never written a plugin...
> I have a service I want to check that uses a POST via HTTPS.  Can I simply use Perl's LWP to submit the request and grep the response for the correct response?  Like 
> 
> if ($response =~ m/okay/) {
>          print "0";   # for return 0
> } else {
>          print "-1";  # for return -1
> }
> 

Yes.

Use any langugae that suits you: TCl, Expect, Ruby, Lisp, sh, 
Python, Parrot, Prolog, .. 
anything that has an interface the system exit call.

You may want to display some comprehensible description of the result, 
"web server no longer working ..." that Netsaint will send to your 
contact group in an SMS or email.

This is one of the many wonderful/amazing things about Netsaint: that it 
is so easy to write a useable helpful service check.

There are 'guidelines for plugin developers' in the Docco that may give 
you some ideas. 

Yours sincerely.


-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.