Re: [Nagios-users] New perl module: Nagios::Plugin::WWW::Mechanize

2010-11-01 Thread Abdul Khader
Dear All,
Does this help me ?

http://udel.edu/~doke/nagios/check_sakai_login

Regards
Abdul Khader

On 10/18/2010 6:37 PM, Andreas Ericsson wrote:
> On 10/18/2010 02:11 PM, Abdul Khader wrote:
>> Dear All,
>> I see that this plug-in allows me to do synthetic transactions.
>> I would like to know if it is possible to use it for java based
>> application server like tomcat.
> It's not. It has no JRE embedded in it, and coding a java engine
> in perl would be almost as complex as it would be stupid.
>
>> My goal is to login to a page with a username and password, then go to
>> the user's home page. If not successful, then send an email alert to the
>> admin.
>>
> Look at java-based automation things instead, but be aware that
> java-based checks are just plain horrible to run unless you can
> get a java-daemon to accept queries from the command-line and
> return the results to you. Java has a ridiculously high loadtime,
> making it extremely unsuitable for writing command-line apps and
> nagios plugins.
>


Email secured by Anti Spam at CtrlS

--
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] New perl module: Nagios::Plugin::WWW::Mechanize

2010-10-18 Thread Andreas Ericsson
On 10/18/2010 02:11 PM, Abdul Khader wrote:
>Dear All,
> I see that this plug-in allows me to do synthetic transactions.
> I would like to know if it is possible to use it for java based
> application server like tomcat.

It's not. It has no JRE embedded in it, and coding a java engine
in perl would be almost as complex as it would be stupid.

> My goal is to login to a page with a username and password, then go to
> the user's home page. If not successful, then send an email alert to the
> admin.
> 

Look at java-based automation things instead, but be aware that
java-based checks are just plain horrible to run unless you can
get a java-daemon to accept queries from the command-line and
return the results to you. Java has a ridiculously high loadtime,
making it extremely unsuitable for writing command-line apps and
nagios plugins.

-- 
Andreas Ericsson   andreas.erics...@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


[Nagios-users] New perl module: Nagios::Plugin::WWW::Mechanize

2010-10-18 Thread Abdul Khader
  Dear All,
I see that this plug-in allows me to do synthetic transactions.
I would like to know if it is possible to use it for java based 
application server like tomcat.
My goal is to login to a page with a username and password, then go to 
the user's home page. If not successful, then send an email alert to the 
admin.

I would appreciate help in this regards.

Regards
Abdul Khader


Email secured by Anti Spam at CtrlS

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] New perl module: Nagios::Plugin::WWW::Mechanize

2009-08-19 Thread Max
I am using this in a plugin I am writing, example code:

   $plugin->form_with_fields(qw(user passwd));
print "R: " . $plugin->field('r') . "\n";
print "S: " . $plugin->field('s') . "\n";
exit;

The field method is created as a proxy the first time it is called so
I can access it without having to write proxies in your module.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] New perl module: Nagios::Plugin::WWW::Mechanize

2009-08-19 Thread Max
Hi Tom,

If you add this subroutine to the end of your module, any methods in
WWW::Mechanize that do not exist as wrapped methods will have method
proxies created for them in your wrapper module IF they exist in
WWW::Mechanize so that users can use the full range of methods
WWW::Mechanize offers in their plugins without you having to move to
multiple inheritence OR having to manually write wrapper calls for
every method.

Once the method proxy is created, AUTOLOAD will not be called again
for that method as the proxy will then exist :p.

If the method does not exist in WWW::Mechanize, normal perl behavior
for undefined methods will be used and the proxy code will be skipped.

- Max

sub AUTOLOAD {

my @args = @_;

# Subroutine the user requested from us that does not exist in our namespace
my $wanted = $Nagios::Plugin::WWW::Mechanize::AUTOLOAD;
$wanted =~ s/Nagios::Plugin::WWW::Mechanize:://ms;

#  We were not passed a reference to ourselves, so exit.
if (ref($args[0]) ne 'Nagios::Plugin::WWW::Mechanize') {
return;
}

my $self = shift @args;
my $mech = $self->mech();

#  If WWW::Mechanize knows this method, we create a proxy for it.
if ($mech->can($wanted)) {
my $func = $wanted(\...@args);
};
EOF

#  New scope to limit effect of 'no warnings'
{
no warnings 'redefine';
eval $func;
$self->die("Can't autocreate WWW::Mechanize::$wanted wrapper: $@")
if $@;
#  Call directly via mech this time; future calls will invoke
#  the proxy method.
$mech->$wanted(@args);
}
}

}
sub AUTOLOAD {
#  Subs we proxy to WWW::Mechanize
my @args = @_;

# Subroutine the user requested from us that does not exist in our namespace
my $wanted = $Nagios::Plugin::WWW::Mechanize::AUTOLOAD;
my $wanted = $Nagios::Plugin::WWW::Mechanize::AUTOLOAD;
$wanted =~ s/Nagios::Plugin::WWW::Mechanize:://ms;

#  We were not passed a reference to ourselves, so exit.
if (ref($args[0]) ne 'Nagios::Plugin::WWW::Mechanize') {
return;
}

my $self = shift @args;
my $mech = $self->mech();

#  If WWW::Mechanize knows this method, we create a proxy for it.
if ($mech->can($wanted)) {
my $func = $wanted(\...@args);
};
EOF

#  New scope to limit effect of 'no warnings'
{
no warnings 'redefine';
eval $func;
$self->die("Can't autocreate WWW::Mechanize::$wanted wrapper: $@") 
if $@;
#  Call directly via mech this time; future calls will invoke
#  the proxy method.
$mech->$wanted(@args);
}
}

}
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Re: [Nagios-users] New perl module: Nagios::Plugin::WWW::Mechanize

2009-06-01 Thread Frost, Mark {PBG}


>-Original Message-
>From: Onotsky, Steve x55328 [mailto:steve.onot...@broadridge.com]
>Sent: Friday, May 29, 2009 12:04 PM
>To: Ton Voon; Nagios Users Mailinglist
>Subject: Re: [Nagios-users] New perl module:
>Nagios::Plugin::WWW::Mechanize
>
>> -Original Message-
>> From: Ton Voon [mailto:ton.v...@opsera.com]
>> Sent: May 29, 2009 04:27
>> To: Nagios Users Mailinglist
>> Subject: [Nagios-users] New perl module:
>Nagios::Plugin::WWW::Mechanize
>>
>> Hi!
>>
>> Just to let you all know there is a new perl module on CPAN:
>> Nagios::Plugin::WWW::Mechanize.
>>
>> You can use this to monitor your website, POSTing your login
>> credentials, navigating through your site, and picking out specific
>> content information. The example shows how I use it to capture the
>> number of users that are subscribed to the opsview-users mailing
list,
>> after logging into Mailman's authentication system.
>>
>> News story here: http://nagiosplugins.org/node/102
>
>Cheers!  This is exactly the thing I'd been waiting for.  Yes, I know I
>could use webinject, but I'm much happier with a Perl interface.
>Thanks!
>
>> I'll also be running a workshop on this at the Nordic Meet next week.
>> You'll wonder how you lived without this! See you there!
>>
>> Ton
>
>This message and any attachments are intended only for the use of the
>addressee and
>may contain information that is privileged and confidential. If the
>reader of the
>message is not the intended recipient or an authorized representative
of
>the
>intended recipient, you are hereby notified that any dissemination of
>this
>communication is strictly prohibited. If you have received this
>communication in
>error, please notify us immediately by e-mail and delete the message
and
>any
>attachments from your system.
>

This certainly sounds cool.  The only reason I'd been starting to look
at WebInject myself was for NTLM authentication support which it's
rumoured to have, but I couldn't get to work.  Any chance this new perl
module might support NTLM authentication?  (I have a Sharepoint server I
want to check).

Thanks

Mark

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] New perl module: Nagios::Plugin::WWW::Mechanize

2009-05-29 Thread Onotsky, Steve x55328
> -Original Message-
> From: Ton Voon [mailto:ton.v...@opsera.com]
> Sent: May 29, 2009 04:27
> To: Nagios Users Mailinglist
> Subject: [Nagios-users] New perl module:
Nagios::Plugin::WWW::Mechanize
> 
> Hi!
> 
> Just to let you all know there is a new perl module on CPAN:
> Nagios::Plugin::WWW::Mechanize.
> 
> You can use this to monitor your website, POSTing your login
> credentials, navigating through your site, and picking out specific
> content information. The example shows how I use it to capture the
> number of users that are subscribed to the opsview-users mailing list,
> after logging into Mailman's authentication system.
> 
> News story here: http://nagiosplugins.org/node/102

Cheers!  This is exactly the thing I'd been waiting for.  Yes, I know I
could use webinject, but I'm much happier with a Perl interface.
Thanks!
 
> I'll also be running a workshop on this at the Nordic Meet next week.
> You'll wonder how you lived without this! See you there!
> 
> Ton

This message and any attachments are intended only for the use of the addressee 
and
may contain information that is privileged and confidential. If the reader of 
the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


[Nagios-users] New perl module: Nagios::Plugin::WWW::Mechanize

2009-05-29 Thread Ton Voon
Hi!

Just to let you all know there is a new perl module on CPAN:  
Nagios::Plugin::WWW::Mechanize.

You can use this to monitor your website, POSTing your login  
credentials, navigating through your site, and picking out specific  
content information. The example shows how I use it to capture the  
number of users that are subscribed to the opsview-users mailing list,  
after logging into Mailman's authentication system.

News story here: http://nagiosplugins.org/node/102

I'll also be running a workshop on this at the Nordic Meet next week.  
You'll wonder how you lived without this! See you there!

Ton


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null