Now that we have our website monitored, we have nice graphs about download speed, access times and so on. But sometimes there are certain things that we would like to know like when a step fails in our scenario. This recipe will show you how to monitor the same.
Getting ready
Make sure you have your Zabbix server properly configured, that you have super admin rights and that you have finished the previous recipe Building web scenarios.
How to do it…
Our first step is to go to Configuration | Hosts and click on the group Triggers on that host.
Add a new trigger to our host by clicking on the Create trigger button in the upper right corner.
Give a name to our new trigger in the Name field.
In the Expression box add the following line :
{host:web.test.fail[Scenario].last(0)}>0
Don't forget to replace host with your host name or template name and Scenario with the name of your scenario.
Select the preferred severity level.
To save our trigger, click the Add button at the bottom.
In our web scenario replace for example, the password with a wrong password.
Go to the page Monitoring | Triggers and see your trigger going in alarm.
How it works...
Even if we did not create an item, it is still possible to monitor certain aspects of our web scenario. When we create our scenario Zabbix adds certain items by itself to our host. This way we can monitor certain aspects like for example, the number of failed steps.
Here we have an overview of the steps that can be monitored with Zabbix:
web.test.in [Scenario,,bps]: Will monitor the download speed
web.test.fail[Scenario]: Will monitor the failed steps
web.test.error[Scenario]: Will monitor the error messages
web.test.time[Scenario,Step]: Will monitor the response time
web.test.rspcode[Scenario,Step]: Will monitor the response code