check for successful web authentication

nagios at mm.quex.org nagios at mm.quex.org
Thu Oct 21 07:49:23 CEST 2004


On Wed, Oct 20, 2004 at 12:33:37PM -0700, Dan Stromberg wrote:
> On Wed, 2004-10-20 at 11:23, Neil wrote:
>> 
>> Has someone created a check that can login to a web form then verify if 
>> login was successful or not? My guess is that it would be something like 
>> 
>>  http://ipaddress/login.asp?username=someone&passpword=secret
>> 
>> I don't know.... :) 
>> 
>> So how did you do it? 
> 
> python has a high level API for accessing web pages that can POST
> information, authenticate with "basic auth" and get/send cookies.

You might be able to use the standard  check_http  plugin for
this, which has options for basic auth as well as POST input.
The POST input looks like how you imagined it to.  The command
you would need to run will probably look something like:

check_http -I ipaddress -u /login.asp \
  --post='username=someone&password=secret'

You could also use the -s (--string) parameter to look for some
text in the page that confirms the login was successful.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list