PagePoker

PagePoker is a Perl package that defines a browser agent with many powerful features for monitoring and testing Web sites.
Download

PagePoker Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Mark Wolgemuth
  • Publisher web site:
  • http://node.to/hacks/

PagePoker Tags


PagePoker Description

PagePoker is a Perl package that defines a browser agent with many powerful features for monitoring and testing Web sites. PagePoker is a Perl package that defines a browser agent with many powerful features for monitoring and testing Web sites, including elaborate failure handling that can send email and trigger SNMP traps. The application comes with three scripts that implement it for different uses: poke.pl, for single agents; pokes.pl, for many parallel agents, and pokehard.pl, for loadtesting and benchmarking.HOW-TO:Run "poke.pl --help" for detailed help on using the package. Briefly, poke.pl creates a PagePoker object, accepting all sorts of options. It is designed for monitoring web pages to verify they are returning desired information or to dump the contents of web pages to a file (like fetch). It can loop on a variety of conditions and crawl a series of pages, posting and passing cookies. The other component, pokes.pl, is simply a forking variation that accepts as its parameters an agent id and the options for that agent. It can be used for monitoring many sites simultaneously or for load testing single sites. On a dual 400 mhz machine I was able to run about 120 concurrent agents.Examples:> poke.pl --url http://node.to returns (first element is date):20000225170507 SUCCESS: Page loaded by agent> poke.pl --url http://node.to --no-status --print-responsereturns the plain html> pokes.pl agent1 "--url http://node.to --no-status --email-failures --email-address who@node.to --iterations 1000 --interval 10" agent2 "--urls http://node.to>>http://tiny.node.to --no-status --email-failures --email-address "1@1.com 2@2.com""will launch two agents, first agent will poll node.to for connection failures every 10 seconds 1000 times, emailing if a failure is encountered, second agent will hit node.to then tiny.node.to and exit, emailing two people if either one doesn't respond.There is a lot of logic to control how often and under what conditions email is sent. You can search for desired in text the headers or the html response, and send email or snmp traps on certain failure conditions. To loadtest, you could launch looping batches of ten agents, adding ten more a minute later in a another process, etc.More advanced load testing can be done with pokehard.pl. It gets its own README (README.pokehard).Here is the output of poke.pl --help, minus the USAGE statement:How to use it: --url "http://host/page" --urls "http://host/page1>>http://host/page2>>etc" --urls-from-file "file_path" --urls-delay "n" Seconds between each request --method {GET|POST} --post-query "query string" --basic-auth-name "agent login" (one per agent) --basic-auth-pass "agent password" --interval "n" Loop with n seconds between pokes --iterations "n" Cycles to run loop (requires --interval) --look-for "pattern to find in response text" --resend-cookie "cookiename" --resend-cookie-between-iterations Allow cookie to be resent through all iterations --use-verbose-response Includes headers in response text --print-response Dump agent retrieved text to STDOUT --disable-on-failure Allow server disabling on failure --disable-snmp-trap "snmp trap" To disable in loadbalancer --enable-on-recovery Allow server re-enabling on recovery --enable-snmp-trap "snmp trap" To enable server after successful run --email-failures Turn on alarm emails --email-addresses "address1 address2 etc" --email-subject "override default with arbitrary text" --failures-until-email "n" Consecutive errors triggers email --min-time-between-emails "seconds" --die-after-date "yyyymmddhhmmss" (requires interval and iterations) --benchmark Store numbers used for performance measurement (by pokehard.pl) --quiet Output nothing (except email, if set) --no-status Do not output status info (ie SUCCESS, etc) --print-to-file "file" Write output to file --help Print this text and exitRequirements:· libwww-perl· URI· HTML-Parser· MailTools· MIME-Base64· Crypt-SSLeay WITH rsaref lib supportWhat's New in This Release:· Bug fixes, SSL support added


PagePoker Related Software