This ZenPack is developed and supported by Zenoss Inc. Commercial ZenPacks are available to Zenoss commercial customers only. Contact Zenoss to request more information regarding this or any other ZenPacks. Click here to view all available Zenoss Commercial ZenPacks.
This ZenPack is included with commercial versions of Zenoss and enterprise support for this ZenPack is provided to Zenoss customers with an active subscription.
Version 3.0.5 Download Released on 2021/12/01 Tested with Zenoss Resource Manager 6.6.0 and Zenoss Cloud 7.0.20
The ZenPacks.zenoss.ZenWebTx ZenPack adds the zenwebtx daemon, which enables availability and performance monitoring of web sites through synthetic HTTP transactions.
Synthetic transactions perform some of the same activities performed by your user community. You create one or more tests that mimic user actions in a Web browser. Zenoss platform then performs these tests periodically, creating events when a test fails or exceeds a time threshold.
Additionally, Zenoss platform can record data for each test run, such as:
This ZenPack uses a scripting language called twill to describe the steps of a test. These steps include actions such as:
You can write twill commands manually. You also can use a Firefox add-on called TestGen4Web to record a browser session that this ZenPack then translates into twill commands. The zenwebtx daemon processes the twill commands periodically, recording data and creating events as appropriate.
The ZenPack introduces the following zProperties:
Data produced by any Zenoss platform data source are called data points. WebTx data sources contain two default data points:
You can create other data points by using the extract and printTimer twill commands, which output data values when the twill commands are run. You must create new data points with the same name you used in those commands to bring that data into Zenoss platform.
The zenwebtx daemon supports XPath queries to extract data from XML documents.
There are several situations in which this ZenPack creates events in Zenoss platform. These events use the component and event class specified on the Data Source tab. These situations are:
To create a WebTx data source:
Select the data source to edit it. Enter information or make selections to specify how and when this data source's Web transactions are performed, and which data should be collected: WebTx Data Source Options
Set to False (the default) to collect information from this data source with enabled SSL verification. You may want to set this value to True to disable SSL verification while collecting information from this data source.
CAUTION! This action is security risking. Disable SSL verification only if you TOTALLY sure that data source is trusted. For example, when you use self-signed SSL certificate for testing purposes.
Note: If you provide values for Initial User, Initial Password, and Initial Authentication Realm, Zenoss platform will use these credentials before accessing the URL specified for Initial URL. All three (Initial User, Initial Password, and Initial Authentication Realm) must be present; otherwise, the values are ignored. Enter information or make selections: WebTx Script Settings
If you specify a file here, and then click Save, Zenoss platform translates the file to twill commands and replaces the contents of the Twill Commands field with the newly translated commands.
Enter twill commands that Zenoss platform will execute to produce values and events for the data source.
If you select this action, then the current contents of the Twill Commands field is completely replaced. Zenoss platform does not save the replaced information.
This ZenPack uses twill to specify the steps of a Web test. Each WebTx data source has a field that contains the twill commands that describe a Web transaction. You can create this list of twill commands manually, or you can record a session in a browser and use that as the basis for your data source.
Some twill commands specify an action, such as following a specific link on a page or entering data in a form field. Other twill commands specify a test, such as searching for specific text on a page or making sure the title does not contain specific text.
Attention: TestGen4Web was deleted from Firefox store. You can use this section only if you have saved session files, created by TestGen4Web Firefox add-on.
The TestGen4Web Firefox add-on allows you to record browser sessions. This ZenPack can take these sessions and convert them to twill, creating a starting point for developing WebTx data sources.
Follow these general steps to convert a TestGen4Web session:
Even if you use TestGen4Web to initially create twill commands, you will frequently want to edit these commands manually to add data points or additional content checks. The Test Twill Commands button on the Script page is helpful when testing twill commands as you create or edit them.
You also can execute twill commands interactively by using the twill-sh program from the command line. This program lets you enter commands one at a time and then inspect the pages that come back.
With Zenoss 5.x you will want to do this from inside the zenwebtx container, on the specific collector if it applies, and switch to the zenoss user with su - zenoss.
Invoke twill-sh with:
Within twill-sh, use the help command to list available commands and see a command descriptions. Of particular interest are these commands:
Often the most convenient way to use twill-sh is to create a text file that contains your twill commands. You can then specify that file on the command line when you invoke twill-sh. This lets you analyze problems that occur.
Invoke twill-sh with a text file as such:
$ZENHOME/ZenPacks/ZenPacks.zenoss.ZenWebTx-3.0.0-py2.7.egg/ZenPacks/zenoss/ZenWebTx/bin/twill-sh -i myTwillCommands.txt
The -i option instructs twill-sh to stay in the twill shell rather than exiting when it finishes running the commands in the myTwillCommands.txt file.
The zenwebtx daemon can access Web servers through HTTP proxy servers and non-authenticating HTTPS proxy servers.
To configure the zenwebtx daemon to use a proxy, you must define the http_proxy and https_proxy environment variables.
where Address is the address of your HTTP or HTTPS proxy server, and Port is the port on which your proxy server listens.
HTTP and HTTPS proxies frequently listen on port 3128. If your proxy server is "my.proxyserver.loc" and it uses port 3128, then add these two lines to the ~zenoss/.bashrc file:
You can test the proxy setup by using twill-sh, the twill interpreter shell.
After setting up the proxy information in the ~zenoss/.bashrc file, follow these steps to test your setup:
$ source ~zenoss/.bashrc
You should see a message similar to this:
current page: http://www.zenoss.com
If an error message appears, then your proxy may not be correctly configured in the ~zenoss/.bashrc file.