Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

Synthetic Web Transactions

VERSION 2  Click to view document history
Created on: Oct 20, 2009 3:42 PM by sstormes - Last Modified:  Nov 10, 2009 10:39 AM by sstormes

Submitted by:

Sonny Stormes


Description:

This ZenPack provides monitoring of multi-step web transactions. The ZenPack leverages Twill scripts to monitor websites.

 

After installing the ZenPack (noting the dependencies), add the desired website as a device making sure your "discovery protocol" is set to None and that SNMP monitoring is disabled (zSnmpMonitorIgnore = 'True').

 

To monitor a site, you need to create a twill script - To learn how to create a twill script, visit: http://twill.idyll.org/ (very simple to do! Hint: use the twill-sh interactive prompt to step through the transaction you wish to perform on your website) Make sure the name of this script matches the name of your device. (i.e. if you are monitoring www.zenoss.com - name the script www.zenoss.com and save it as a text file)
-----------------------------------------------------------------------------------------------------
An example script looks something like this:

 

setlocal username 
setlocal password
go http://www.slashdot.org/
formvalue 1 unickname $username
formvalue 1 upasswd $password
submit
code 200  # make sure form submission is correct!

 

Helpful commands to use in twill:

showforms
show
follow <link name>

 

Which would log into slashdot with the username and password provided and check to see what the return code is. You can continue adding to this script by adding lines like "follow <link name>, or formvalue 1 <field> <value to add to form>, etc....

 

To get the best test, make sure you perform many operations within your twill script to verify the accuracy of the synthetic transaction.
Click around, fill out forms, post information, and log out to make sure everything is working end-to-end on your site. The more detailed
your transaction, the more accurate your test.
-----------------------------------------------------------------------------------------------------

 

Copy your twill script to the scripts directory of the ZenPack -
$ZENHOME/ZenPacks/ZenPacks.synthetictransactions.SonnyStormes-1.0.egg/ZenPacks/synthetictransactions/SonnyStormes/scripts

 

To test all the components and ensure they are in working order
1) Go to /Devices/Websites/Templates and select the "Synthetic Transactions" template.
2) Select the data source "transaction_time"
3) In the field "Test against device" enter the name of the website and click the "test" button. The result should be "SYNTHETIC TRANSACTION SUCCESSFUL|time=X.XX;;;0.00". If the transaction does not
complete successfully, the message will read "SYNTHETIC TRANSACTION FAILED|time=X.XX;;;0.00" and a alert will be generated at the critical level.
4) Adjust the Critical and Warning Thresholds to your desired level

 

If everything is in working order, bind the template to the devices.

 

As an example, I have included a small script that uses www.zenoss.org to get you started on your twill script creation.

 

 


Screenshots:

 

render.png

 


REQUIREMENTS:

  • Zenoss Version: 2.4
  • ZenPack Dependencies:
  • External Dependencies:
    • Install twill as the Zenoss user:
      • su - zenoss
      • easy_install twill
  • Installation:
    • Create the device class /Devices/Websites


Source: http://zenpacks.zenoss.org/trac-zenpacks/browser/zenpacks/ZenPacks.synthetictransactions.SonnyStormes

Tagged Releases:

Change History:

  • 1.0 initial version

Trac tickets: http://zenpacks.zenoss.org/trac-zenpacks/report/1

Known issues:

Attachments:
Note: binary attachments ending in .zip will need to be unzipped before use.
Comments (8)