This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

3 WEB Scenario

Scenario is set of HTTP requests (steps), which will be periodically executed by Zabbix server. Normally a scenario is defined for one particular part of functionality of a WEB application. Scenarios are very convenient way of monitoring user experience. WEB Scenario is linked to a host application for grouping. WEB Scenario is periodically executed and consists of one or more Steps. All cookies are preserved during execution of a single scenario.

Example 1

Monitoring of Zabbix GUI

If we want to monitor availability and performance of Zabbix GUI, we have to login, check how quickly Overview and Status of Triggers screens work and then logout.

The scenario may have the following steps:

  1. Login
  2. Go to Overview screen
  3. Go to Status of Triggers screen
  4. Logout

If a step cannot be performed, execution of scenario fails.

Parameter Description
Application WEB scenario will be linked to this application. The application must exist.
For example: Zabbix server
Name Name of the WEB scenario.
The name will appear in Monitoring → Web
For example: Zabbix GUI
Update interval How often this scenario will be executed, in seconds.
For example: 60
Agent Zabbix will pretend to be the selected browser. Useful for monitoring of web sites which generate different content for different web browsers.
For example: Opera 9.02 on Linux
Status Active: active scenario, it will be executed
Disabled: disabled scenario, it will NOT be executed
Variables List of macros to be used in configuration of the steps.
Syntax:
{macro}=value
The macro {macro} will be replaced by "variable" in step's URL and POST variables.
For example:
{user}=guest
{password}=guest
Note: Variables are not URL-encoded.
Steps Steps of the scenario.

As soon as a scenario is created, Zabbix automatically adds the following items for monitoring and links them to the selected application. Actual scenario name will be used instead of "Scenario".

Item Description
Download speed for scenario 'Scenario' This item will collect information about download speed (bytes per second) of the whole scenario, i.e. average for all steps.
Item key: web.test.in[Scenario,,bps]
Type: float
Failed step of scenario 'Scenario' This item keeps number of failed step of the scenario. If all steps are executed successfully, 0 is returned.
Item key: web.test.fail[Scenario]
Type: integer

Web monitoring items are added with 30 day history retention and 90 day trend retention periods.

These items can be used to create triggers and define notification conditions.

Example 1

Trigger "WEB scenario failed"

The trigger expression can be defined as:

{host: web.test.fail[Scenario].last(0)}#0

Do not forget to replace the Scenario with real name of your scenario.

Example 2

Trigger "WEB application is slow"

The trigger expression can be defined as:

{host: web.test.in[Scenario,,bps].last(0)}<10000

Do not forget to replace the Scenario with real name of your scenario.