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
98195
Files:
FileDescription
check_form_mech.pycheck_form_mech.py
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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!