Zabbix web scenarios for website and API checks: what they do and when teams need them
A Zabbix web scenario is a set of HTTP or HTTPS steps that Zabbix runs in order against a website or API, from the Zabbix server or a proxy, to check that a user journey still works. Host-level checks can confirm that a server is up and a port is open, but they cannot answer questions such as whether customers can log in, whether the checkout page still returns the expected content, or how long a multi-page process takes from start to finish. Those are the questions business owners ask after an incident, and a web scenario is the Zabbix object built to answer them.
Each scenario is made of steps. Every step has its own URL, and Zabbix follows up to 10 redirects per step and keeps cookies for the duration of one run, so a simulated login can carry a session from the first request to the last. For each step, Zabbix records download speed, response time and response code, which lets you see exactly where a journey slowed down or failed rather than only that it failed. Attempts can be set to as many as 10, and retries apply only to network problems, so a wrong response code or a missing required string is reported as a failure at once.
A simple HTTP check is usually enough when one URL returning the right status is the whole question. A scenario earns its place when the answer depends on several requests in sequence, on state carried between them, or on the content of a page. Before you build one, confirm with your application owners which steps matter most, which strings prove success, and whether any step needs data from a previous response. Note that a step URL is limited to 2048 characters, so long query strings may need to be reviewed during design.
How a web scenario is built: steps, variables and checks per situation
A public page check is the simplest web scenario: one or a few HTTP or HTTPS steps that fetch pages a visitor can reach without signing in, such as a home page, a product listing or a status page. Each step records the response code, response time and download speed, so the scenario shows whether the page loads and how long it takes. Because no credentials are involved, the design work is mostly about choosing what the page must contain.
- Step per page: Add one step for each page that matters to the business, in the order a visitor reaches them, and keep the step URLs under the 2048 character limit.
- Required string: Set a required string that appears only when the page renders correctly, such as a heading or a footer marker, so an error page returning a success code still fails.
- Expected status code: Set the expected response code per step, and let redirects be followed, since the scenario follows up to 10 redirects.
- Retries for network problems: Configure attempts up to 10, knowing that retries apply only to network errors, not to wrong codes or missing strings.
- Response time trigger: Attach a trigger to the per-step response time so slow responses are flagged before the page actually fails.
Before you rely on this pattern, confirm with a browser or a manual request that the required string is present on the live page and that it will not appear on a maintenance or error template.
A simulated login scenario checks that a user can sign in and reach a page that only authenticated users see. It usually has three parts: load the login page, submit the credentials, then request a protected page. Cookies set during the login must be carried to later steps, so the scenario keeps them for the duration of one run. Cookies do not carry over to the next run, so each execution signs in again from a clean state.
- Form submission step: Post the login form fields to the endpoint the form uses, and capture the values the server expects, such as a hidden token, into variables for the next step.
- Variables between steps: Store values taken from a response, for example a session identifier or a token from the page, and reuse them in the following step's URL, body or headers.
- Required string on the protected page: Check for text that only a signed-in user sees, such as an account name, so a failed login cannot pass on a generic page.
- Redirect handling: Expect the redirect chain that follows a successful sign in, noting that redirects are followed up to 10 times, and add checks that confirm the final destination.
- Test account and secrets: Use a dedicated low-privilege test account, and keep its password in macros rather than in the step text, so the scenario configuration does not expose it to every administrator.
Confirm with the application owner which login flow is current, including any multi-factor step that a scripted scenario cannot complete, before promising coverage of the full sign-in.
An API check with a token usually calls a token endpoint or uses a token issued outside the scenario, then calls a data endpoint with that token in an authorization header. The check is less about the page and more about the contract: the status code, the shape of the response and whether the token is accepted. Variables carry the token from the first step to the second, and the scenario shows which step failed.
- Token step: Request a token from the authentication endpoint, and store the value from the response in a variable so it is not hard-coded.
- Header reuse: Pass the stored token as a header in the data request, and keep the header name and format consistent with what the API documents.
- Status code per step: Set the expected code for each call, such as a success code for the data request and a rejection code for a deliberately invalid request if you test that path.
- Required string for the response body: Check for a field name or value that must appear in a valid response, so an empty or error body with a success code still fails.
- Token lifetime: Confirm how long the token stays valid, since a scenario that runs after expiry will fail on authentication rather than on the service.
Ask the API owner to confirm the token format, the required header names and whether the test client is allowed to request tokens on a schedule, since many providers limit or audit that traffic.
Web scenario options and when each one fits
This table compares the main web scenario settings in Zabbix, what each one checks, when it fits and what it costs you in maintenance or signal quality. Read each row as a decision: pick the setting that matches the failure you need to catch, then check the trade-off before you build a large scenario set.
| Option | When it fits | Trade-off to weigh |
|---|---|---|
| Steps (ordered HTTP or HTTPS requests) | Multi-page journeys such as load page, submit form, then fetch a confirmation, where each step depends on the one before | Every extra step adds a request to maintain, and a change in one page can break the whole scenario |
| Required strings | Pages that return HTTP 200 even when the content is wrong, such as an error page or an empty results list | The string must be stable; a copy change or localized text will raise false problems |
| Expected status codes | APIs and endpoints where a specific code (for example, 201 or 204) is the correct success signal | Strict codes fail on harmless redirects or new codes after a vendor change, so review them after upgrades |
| Variables between steps | Chaining a token, session value or resource ID from one response into the next request | Extraction patterns break when response formats change, and the scenario then fails at an unclear step |
| Authentication (basic, NTLM or form-based login) | Protected sites and APIs where the check must prove a logged-in path works | Test credentials must be stored and rotated; use a dedicated monitoring account with minimal rights |
| Retries (up to 10 attempts) | Networks with occasional transient drops where a single failure would create noise | Retries only cover network problems, so wrong codes or missing strings still fail at once; more attempts delay alerts |
| Proxy assignment | Sites reachable only from a branch, DMZ or cloud segment, or where checks should run close to users | The proxy becomes a dependency; confirm it stays online and sized for the scenario count |
| Timeouts and response time triggers | Performance thresholds that flag slow steps before users report them | Thresholds set from guesses cause alert fatigue; base them on measured baselines from your environment |
| Step URL length | Long query strings or encoded parameters in API calls | Step URLs are limited to 2048 characters, so move long data into the request body or split the check |
How to set up a web scenario in Zabbix, step by step
This sequence turns a website or API journey into a Zabbix web scenario that checks content, fails on the right conditions, and alerts on slow responses. Each step ends with a check so problems surface before the monitor goes live.
Confirm the target and its test account
Before touching Zabbix, the owner of the application and the monitoring team agree on the exact URLs to check, the order of the journey, and a dedicated test account that is allowed to log in and cannot change production data. Confirm with the application owner whether the login uses a form, a token or SSO, because that decides which steps Zabbix can replay. The step is done when the team can reproduce the full journey manually in a browser or with a tool such as curl and can name the text that appears on each successful page.
Decide server or proxy execution
Decide which Zabbix component runs the scenario: the server, or a proxy placed close to the target network. A proxy is the better fit when the application is only reachable from one network segment or when checks should keep running through a server outage. Confirm the placement with the network team, including firewall rules and any outbound proxy the target requires. The step is done when the chosen host or proxy can reach every URL in the journey, verified with a test request from that exact machine.
Build the scenario and its steps
Create the web scenario on the host that represents the application, then add one step per URL in the order the user would visit them. Use variables for the base address and test credentials so the scenario can move between environments without editing every step. Keep the number of steps focused on the journey, since each step adds a request and a point of failure. The step is done when a manual run of the scenario from the Zabbix interface completes every step in sequence and the stored values show the expected response codes.
Pass values between steps
Where a step depends on data from a previous page, such as a session token or a generated identifier, capture that value with a regular expression and reuse it in the next step through a variable. Cookies are kept for one run, so a login that sets a session cookie usually needs no extra work, but tokens in response bodies must be captured explicitly. The step is done when a manual run shows the captured value being sent in the following request and the final step returns the expected page.
Add required strings and status checks
Set the expected response code for each step and add a required string that appears only when the page has rendered correctly, such as a logged-in user name or a known heading. Without a required string, a server error page with a 200 status can pass the check. Remember that Zabbix retries only network problems, so a wrong response code or a missing string fails the step immediately. The step is done when the manual run passes and the team has confirmed the required string is unique to the correct page.
Create response time and failure triggers
Create a trigger on the scenario failure item so that a failed run raises a problem, and a separate trigger on the response time item for the slow case, with a threshold agreed with the application owner from observed normal behavior. Set the failure trigger to alert on the first failed run only after confirming the retry setting suits the target's normal network behavior. The step is done when both triggers show the expected state in the Zabbix interface and each one links to the correct scenario item.
Validate with a manual run and a deliberate failure
Run the scenario manually and confirm every step, string and timing value is recorded as expected. Then make the check fail on purpose, for example by pointing one step at a wrong path or changing the required string, and confirm that the failure trigger opens a problem and that the alert reaches the intended recipient. Restore the correct configuration and confirm the problem resolves. The step is done when the team has a documented pass result and a documented failure result, and the application owner has accepted both.
Document the scenario and hand it over
Record the scenario's purpose, its steps, the test account owner, the execution location, the trigger thresholds and the rotation plan for the test credentials in the team's runbook. Name who receives alerts and who updates the scenario when the application changes its pages or login flow. The step is done when a second engineer can read the runbook and identify the affected steps and triggers for a given failure without contacting the author.
Why retries and response time triggers need careful tuning
Retries in a Zabbix web scenario only cover network problems. Attempts can be set to up to 10, but they repeat when a connection fails or times out, not when the server answers with a wrong response code or when a required string is missing from the page. A step that returns an unexpected status or lacks the expected text fails on the first attempt and raises the problem immediately. This matters for alert noise. A team that expects retries to absorb a flaky deployment or a briefly broken page will see a failure notification sooner than it expects, and a team that counts on retries to filter out content-level noise will find that they do not. Before go-live, decide which failures should page someone at once and which should wait for a network-level retry, and set the trigger recovery and dependency rules to match. Confirm the exact retry and failure behavior for your Zabbix version in the web monitoring documentation.
Response time triggers should be set from a baseline the team measures in its own environment, not from a number copied from another installation. Run the scenario for a representative period, covering normal business hours, batch windows and any known peaks, and record the response time and response code for each step. Look at how the figures vary across the day and across the proxies or servers that run the checks, because the same page can respond differently from different network locations. Then set the trigger threshold above the normal range with enough margin that routine variation does not generate alerts, and review the threshold after each change to the application or hosting. Name an owner for the baseline and for each threshold so that a slow API does not become a problem nobody can explain. Ask your DeployOpen or internal team to document the measurement method so the thresholds can be defended in a review.
Securing test accounts, credentials and monitoring traffic
A web scenario is a logged-in client that runs on a schedule, so it carries credentials, touches production endpoints and generates traffic that the target system sees as real users. The cards below cover the decisions that keep those risks contained, from how secrets are stored to where the polling proxy sits.
Credentials stored in scenario macros
Scenario variables and macros hold the test username, password or API token that each run sends. Anyone with access to the host configuration can read these values, and they can appear in exports and API responses that people share during troubleshooting. Before go-live, list every scenario that holds a secret, confirm which user roles can open those scenarios, and ask the Zabbix documentation and your security team how secret macros are handled in the version you run. The Zabbix security and secrets pages cover the controls that exist.
Web monitoring docsDedicated low-privilege test accounts
A scenario that logs in as a administrator or as a shared employee account gives an attacker or a bug in the scenario the same reach as that user. Create a dedicated test account for each application with only the permissions the checks need, such as viewing a dashboard or calling one read-only endpoint. Keep checks that create, change or delete data on a separate test tenant. Name the account clearly so audit logs show it is synthetic, and ask the application owner to approve which actions the account may perform.
Synthetic traffic filling endpoint logs
A check that runs every minute creates thousands of requests a day in the web server, API gateway and application logs. This noise can hide real incidents, inflate log storage costs and trigger rate limits or fraud rules that block the monitoring host. Agree the interval with the application team, tag monitoring requests with a fixed user agent or header where the application supports it, and exclude those requests from user analytics. Check how long your logs are kept before choosing an interval.
Proxy placement across network zones
Web scenarios run from the Zabbix server or from a proxy, so the choice of host decides which network paths and firewall rules the checks use. A proxy in the same zone as the application tests the path users inside that zone see, while a proxy outside the perimeter tests what external users reach. Each proxy needs outbound access only to the endpoints it checks and a secure channel to the server. Document which zone each scenario runs from and who owns the proxy's firewall rules.
Scenario output and stored responses
Scenario steps store response codes, response times and any matched text in the Zabbix database, and failed steps can expose page content in problem details. If a page shows personal data or session tokens, that content may end up in history, alert messages and notification channels. Select required strings that are fixed markers rather than personal data, review what appears in problem messages, and limit who can read the frontend views that show scenario results.
How a web scenario request flows from the poller to the target and back
The check starts in a Zabbix server or proxy poller, which sends each step of the scenario in order to the target website or API. Cookies and variables captured in one step carry into the next, and redirects are followed within the limit. Each step returns response time, response code and download speed, which are stored in the database and evaluated by triggers. The trust boundary sits where requests leave the monitoring network, so firewall rules and proxy placement decide what the poller can reach.
Each step crosses from the monitoring network to the target and returns measured values.
Limits to confirm before you rely on web scenarios
Web scenarios are simple to set up, but a few hard limits decide whether a check can cover your site or API. Confirm each one against your Zabbix version and your own test design before you commit monitoring to them.
Attempt ceiling of 10
A web scenario can be configured with up to 10 attempts, and retries only apply to network problems. A timeout or connection failure will be retried, but a wrong response code or a missing required string fails on the first attempt. Confirm the attempt count your flaky endpoints need, and do not expect retries to smooth over application errors that return HTTP 200 with the wrong content.
Web monitoring docsRedirect follow limit
Each step follows up to 10 redirects. Login flows that bounce through identity providers, SSO gateways and multiple tenant hosts can exceed this and fail in a way that looks like an application outage. Trace your real redirect chain in a browser or with curl, count the hops, and set the step to check the final page you actually care about.
Step URL length of 2048 characters
Each step URL is limited to 2048 characters, including query parameters. Search endpoints, OAuth authorization requests and APIs that pass long tokens in the query string can hit this ceiling. Confirm the longest URL your steps generate, and move large values into the request body or a variable where the API allows it.
Cookies kept for one run only
Cookies are held for the length of a single scenario run and then discarded, so every run starts with a new session. Login-dependent steps must authenticate again each time, which adds load and may trigger rate limits or lockouts on your identity provider. Confirm that a fresh login per run is acceptable, and plan a dedicated monitoring account that does not share a password rotation schedule with people.
No JavaScript execution
Web scenarios fetch HTML and HTTP responses but do not run JavaScript, so content rendered by a single-page app after load is invisible to a required-string check. A page may return the right HTTP status while showing a blank screen to users. Test your critical journeys in a browser, and where the page depends on client-side rendering, plan browser items for those flows instead of relying on string matching alone.
When to use browser items instead of web scenarios
Web scenarios answer a narrow question well: does each HTTP or HTTPS step return the expected response code, and does the page or API response contain the required string within an acceptable time. They do not run JavaScript, render a page or drive a browser, so a single-page application that builds its content in the browser, a login form that depends on client-side scripts, or a checkout step that only appears after interface events can look healthy to a web scenario while the user cannot complete the task. Use browser items when the failure you need to catch only shows up in a rendered page or in an interaction sequence, such as clicking a button, filling a form or waiting for an element to appear.
Browser items drive a real browser through a Selenium or ChromeDriver endpoint, which means you must deploy and maintain that endpoint in addition to the Zabbix server or proxy that runs the checks. Plan for the extra capacity: browser sessions use far more memory and CPU than HTTP requests, so the number of journeys per interval and the poller sizing need to be checked against the hosts that will run them. Also weigh the experimental status of browser items in the Zabbix release you run, and confirm the current status in the Zabbix web monitoring documentation before committing a customer-facing check to them. For setup details, screenshots, timeouts and sizing, follow the sibling page on synthetic web monitoring with browser items.
A practical approach is to keep web scenarios for the broad, high-frequency checks on every public page and API endpoint, and add a small number of browser-based journeys for the flows that matter most to users, such as sign-in and a core transaction. Confirm with your team which journeys justify the added infrastructure, who owns the Selenium or ChromeDriver endpoint, and how its failures will be alerted, so that a broken browser endpoint does not look like a broken website.
What buyers ask before they build or hire help for web scenarios
How much effort does a first web scenario take compared with a full Zabbix rollout?
A first web scenario is a small, bounded task compared with a full monitoring rollout. It covers one journey, one set of endpoints and a few alerts, and it can reuse the Zabbix server or proxy you already run. A full rollout also covers installation, database sizing, agents, templates, notifications and access control. No supplied figure gives a duration, so ask any partner for a written scope that lists the journeys, environments and alert paths included, then compare that list with your own inventory before agreeing on a timeline.
What drives the effort of web scenario monitoring up or down?
Effort rises with the number of user journeys, the authentication method, the handling of API tokens and the number of environments. Each journey is a set of ordered steps with its own required strings, variables and retries. Each login type adds design work, and each environment needs its own URLs, test data and alert thresholds. Effort falls when journeys are few, endpoints are documented and test accounts are stable. Ask for a quote that prices each journey and environment separately so you can see which choices move the cost.
How should API tokens be handled in web scenarios?
Store tokens as secrets, not as literal values in step definitions where they are visible to every user with configuration access. Use a dedicated monitoring account with the narrowest permissions the check needs, and set an expiry or rotation date you can track. Confirm with your identity team how the token is issued, how long it lives and what happens when it is revoked. A scenario that fails after rotation should raise a clear alert, so plan who receives it and who can update the value.
Can an internal team build web scenarios without outside help?
Yes, an internal team with Zabbix administration skills can build simple scenarios, especially single-page checks and one login flow. Work becomes harder when scenarios must follow redirects across identity providers, pass tokens between steps, or run from several proxies. Assess your team against the Zabbix documentation for web monitoring and test the scenario against a non-production endpoint first. If the skills are missing, a fixed-scope engagement can build the first set and hand over documentation, so your team can extend it later.
What does the work need from our team before it starts?
Expect to provide dedicated test accounts for each role the journeys cover, documentation for the endpoints and their expected responses, and a named owner who can approve the checks. You will also need a change window for production testing, network access from the server or proxy that runs the checks, and a decision on which alerts page someone. Without these inputs, scenarios tend to be built against assumptions that break at the first deployment. Ask the partner to list these inputs in the written scope.
What recurs after web scenarios go live?
After go-live, scenarios need maintenance whenever the application changes. Login pages, field names, required strings and API versions all move, so each release can break a check. Test accounts expire or change, and tokens need rotation. Zabbix also has its own release cycle: standard releases are supported for 12 months and LTS releases for five years, so the scenarios must be retested after upgrades. Budget for regular review, a named owner for failures and periodic retesting, and ask any partner whether this support is available as a retainer.
Should we use web scenarios or browser items for a login flow?
Use web scenarios for HTTP and HTTPS checks that a server can run without rendering a page, such as API calls, form posts and status endpoints. Use browser items when the journey depends on JavaScript, rendered content or a real browser session, and when you can accept the experimental status and the sizing of a Selenium or ChromeDriver endpoint. Many teams run both, with web scenarios for fast, frequent checks and browser items for a few critical journeys.
How DeployOpen scopes and delivers Zabbix web scenario monitoring
The sequence moves from a written list of journeys and endpoints to scenarios running inside your Zabbix environment, with documented variables, triggers and an ongoing support option once the checks are live.
Inventory the sites and APIs to check
DeployOpen and your team list the websites, HTTP APIs and user journeys that matter, with the business owner for each and the level of failure that should raise an alert. The list shows which endpoints need a simple URL check, which need a multi-step scenario with a simulated login, and which are better suited to browser items. The step is done when the inventory is agreed and each endpoint has an owner.
Agree the scope in writing
DeployOpen writes down the scenarios in scope, the Zabbix version and environment they run in, the hosts or proxies that will execute them, the test accounts to be provided, and the deliverables such as scenario definitions, triggers and documentation. Items outside the list, such as browser-based journeys or new monitored systems, are named separately. The step is done when the scope document is signed off by both parties before any build work starts.
Confirm access, accounts and network paths
Your team provides a dedicated test account for each login flow, confirms which network segments the server or proxy can reach, and confirms how credentials will be stored and rotated. DeployOpen checks that the chosen execution point can reach each endpoint, including any internal APIs behind a firewall. The step is done when a simple test request from the execution host returns the expected status for every endpoint in scope.
Build scenarios in your Zabbix environment
DeployOpen builds each scenario in your own Zabbix instance, adding steps in order, required strings to confirm the right content came back, variables passed between steps, and retry settings. Scenarios are built in a staging or non-production instance first where one is available, then promoted. The step is done when each scenario runs cleanly on its own and its items, such as response time and response code per step, populate as expected.
Document variables, triggers and thresholds
DeployOpen writes down each scenario's variables, the trigger conditions for failed steps and slow response times, the expected strings, and which host, proxy or template holds each item. The documentation also records the reasoning for each threshold so that your team can adjust it later without guessing. The step is done when a team member who did not build the scenario can read the document and locate every item and trigger.
Test failure and recovery behavior
DeployOpen tests what happens when a page changes, a login fails, a redirect loops or the endpoint is unreachable, and checks that the expected problems open and close with the right severity. Because retries apply only to network problems, the test confirms that wrong response codes and missing strings produce a visible failure without repeated retries masking them. The step is done when each tested failure produces the expected problem and recovery event.
Hand over to your operations team
DeployOpen walks your operations and monitoring team through the scenarios, triggers, documentation and the procedure for changing a scenario after a site or API release. Your team confirms it can add or update a scenario and understands which changes need a retest. The step is done when the handover session is complete and your team has run one supervised change.
Support the checks over time with a retainer
Once the scenarios are live, your team may choose a retainer for ongoing support, scenario updates after application changes, periodic review of thresholds and retesting after Zabbix upgrades. The retainer scope, response expectations and fees are agreed in writing, and the quote follows from the defined scope. The step is done when the support terms are signed or your team confirms it will maintain the checks internally.

