Zabbix Series (eight) Zabbix add State Monitoring for Web page URLs __zabbix

Source: Internet
Author: User
Tags response code
Web monitoring through Zabbi can not only monitor the response time to the site, but also according to the status code returned by the site, or response time to do the alarm


1, the need to monitor the host to add Web monitoring

Open the host list in Configuration-hosts, select the Web to which you want to add a monitoring host, and create a application


Select the Web item, and then click the Create Web scenario in the upper-right corner




Enter the name of the monitor in name, the agent is the browser type to select the test site


To add a test step on the Steps tab

The name is the test step names, the URL monitors the site's real url,required status colder is the monitoring Request page returns the status code, usually set 200
After the addition is complete you can see the monitoring just added in Monitor-web




2, Alarm settings

After adding web monitoring, open the Configuration-hosts host list again and select triggers
Click on the top right corner of the create triggers


Enter the name of the triggers in name
Click Add


Click the Select on item

Automatically create the appropriate keys after you add Web monitoring, and automatically create the appropriate keys after you add Web monitoring, but select the appropriate hosts that have the Web defined

Select the expression in function to trigger the alarm when the returned status code is not equal to variable n, and the value of n is set to 200 below



Expression: If the last 4 consecutive Response_code values are not 200, the alarm is triggered
{192.168.3.86:web.test.rspcode[3.86_http_status,3.86_http_status].last (0)}<>200 and {192.168.3.86: Web.test.rspcode[3.86_http_status,3.86_http_status].last (1)}<>200 and {192.168.3.86:web.test.rspcode[3.86_ Http_status,3.86_http_status].last (2)}<>200 and {192.168.3.86:web.test.rspcode[3.86_http_status,3.86_http_ Status].last (3)}<>200


Test, the target machine 3.86 on the index.html renamed to index, you can see the trigger alarm, when the alarm, we can the target machine operation, Alarm, trigger restart script, etc., as detailed in:

Zabbix Series (ix) zabbix3.0 implement automatic triggering of zabbix-agent-side shell Script task

http://blog.csdn.net/reblue520/article/details/52315154



Note:


Once we have created the Web monitor, we can look at the performance of the Web site. Zabbix provided us with 6 item key, in fact, three, respectively for a single phase and the entire stage, three item for web.test.in, Web.test.fail, Web.test.error, see its specific use.


Web Scenario Monitor item The following key is automatically added after the Web Monitor item is created.
Key description
web.test.in[scenario,,bps] Download speed in the entire phase, Unit Bytes/sec
Type: Numeric (float)
Web.test.fail[scenario] The entire detection phase, the number of failed stages, if all phases (step) are successful, then return 0
Type: Numeric (unsigned)
Web.test.error[scenario] Returns the last error message (text)
The Web Monitor entry instance creates the trigger "Web scenario failed" with the following expression
{host:web.test.fail[scenario].last (0)} #0
Create TRIGGER "WEB application is slow", the expression is as follows
{host:web.test.in[scenario,,bps].last (0)}<10000
Note: scenario changed to your Web solution name
Web Scenario Phase Monitoring items
Key description
WEB.TEST.IN[SCENARIO,STEP,BPS] Retrieves the download speed for the specified phase, bytes per second
Type: Numeric (float)
Web.test.time[scenario,step] Gets the specified stage response time, after which the time calculation is fetched from the start request to all response information
Type: Numeric (float)
WEB.TEST.RSPCODE[SCENARIO,STEP] Retrieves the HTTP response code for a specified phase
Type: Numeric (unsigned)


The step item uses an instance to create the trigger "Zabbix GUI login is too slow" trigger, the trigger expression is as follows
{Zabbix:web.test.time[zabbix gui,login].last (0)}>3
Description: ZABBIX GUI is the name of the Web schema, login as a stage (step) name
Web monitoring item Data retention time Web monitoring historical data preservation 30 days, trend data saved 90 days, old data will be cleared

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.