Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check form mechanize

Rating
0 votes
Favoured:
0
Current Version
0.1
Last Release Date
2010-09-07
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI 2009R1
License
GPL
Hits
98424
Files:
FileDescription
check_form_mech.pycheck_form_mech.py
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Check form mechanize allows you to fill in and submit a submit a form and then check the result for an expected string. This script uses mechanize to emulate a browser.
usage: check_form_mech.py [-h] -u URL -f FORMNAME -n VALUES [-w WARNING]
[-c CRITICAL] [-v] -e EXPECT

optional arguments:
-h, --help show this help message and exit
-u URL, --url URL url string e.g -u http://foobar.com
-f FORMNAME, --formname FORMNAME
name of the form e.g -f login
-n VALUES, --values VALUES
values for input e.g -n "login=foo&password=bar"
-w WARNING, --warning WARNING
time in seconds before warning e.g -w 5
-c CRITICAL, --critical CRITICAL
time in seconds before critical e.g -c 10
-v, --verbose print out nagios timing information
-e EXPECT, --expect EXPECT
string to find on returned web page e.g -e "Hello
Sweetie"


This is my first bit of python so if you want to point out my mistakes please do!