Zabbix basic monitoring, port monitoring, web site monitoring, mail alarm

Source: Internet
Author: User
Tags response code import database set up email

Zabbix Monitoring:

Zabbix version:3.4.1


PHP version:7.0

Nginx version:1.12.1



Install Zabbix: Install dependency Package: Yum install –y autoconf automake imakelibxml2-devel expat-devel  cmake gcc gcc-c++ libaio libaio-devel bzr bisonlibtool Download Zabbix Source package:/HTTP Decompression Package Tar  xzf  zabbix-3.4.1.tar.gzcd zabbix-3.4.1 ./configure    --prefix= /usr/local/zabbix-3.4  --enable-server--with-mysql=/usr/bin/mysql_config --with-net-snmp - -with-libcurl--with-libxml2   --enable-agent     (that is, do the service side and do the monitoring end) make   &&  make install  Create PHP project directory/DATA/ZABBIXCP&NBSP;-RP&NBSP;&NBSP;ZABBIX-3.4.1/ frontends/php/*    /data/zabbix  CREATE DATABASE Zabbix Import Database: Mysql -u zabbix -p  -h   zabbix  <  zabbix-3.4.1/database/mysql/ Schema.sqlmysql -u zabbix -p -h   zabbix  <  zabbix-3.4.1/database/ mysql/images.sqlmysql -u zabbix -p -h   zabbix   <  zabbix-3.4.1/database/mysql/data.sql

Configuring The Zabbix project configuration file


650) this.width=650; "Src=" 3-wmp_4-s_1998407967.png "title=" 1.png "alt=" Wkiol1ncslytp8ddaaen49-8oiu178.png-wh_50 "/>

Modify the configuration file for the Zabbix program vim/usr/local/zabbix-3.4/etc/zabbix_server.conf

650) this.width=650; "Src=" 3-wmp_4-s_353463577.png "title=" 2.png "alt=" Wkiol1ncsewjwerzaaciqnplq7m555.png-wh_50 "/>

Start Zabbixserver



Zabbix configuration nginx:

650) this.width=650; "Src=" 3-wmp_4-s_324408968.png "title=" 3.png "alt=" Wkiol1ncsmrrijtuaaen9idwapu492.png-wh_50 "/>

Configure the monitoring for this machine:

Open URL: Enter the default user password:Admin/zabbix

650) this.width=650; "Src=" 3-wmp_4-s_1389159426.png "title=" 4.png "alt=" Wkiom1ncsqjcsuqxaabbp_v6ksu712.png-wh_50 "/>

To create a host:

650) this.width=650; "Src=" 3-wmp_4-s_2095174026.png "title=" 5.png "alt=" Wkiol1ncsn2tduddaacczbbvib4895.png-wh_50 "/>

Select the template to enable:

650) this.width=650; "Src=" 3-wmp_4-s_12848115.png "title=" 6.png "alt=" Wkiom1ncsrra-av4aafcmvpmpqe247.png-wh_50 "/>

Set up email alerts:



After decompression

Tar xzf sendemail-v1.56.tar.gz && CD sendemail-v1.56 && CP sendemail/usr/local/bin

To create a Send message script:





sendemail-f [email protected]-T "$to"-S "$subject"-O message-content-type=html-o tls=no-o Message-co Ntent-type=html-omessage-charset=utf8-xu [email protected]-xp passwd-m "$body"

-F Sender e-mail address

-T recipient email Address

-S SMTP server address

-U Theme

-O content type, setting character set

-xu Sender Address

-XP Sender Password

Zabbix console settings:

650) this.width=650; "Src=" 3-wmp_4-s_1183360049.png "title=" 7.png "alt=" Wkiom1ncsyqzfebqaabombbazcy597.png-wh_50 "/>

650) this.width=650; "Src=" 3-wmp_4-s_402609113.png "title=" 8.png "alt=" Wkiol1ncswcdqxqwaaeifv_olv0408.png-wh_50 "/> Script Drop location in alertscripts directory (alertscriptspath=${datadir}/zabbix/alertscripts )

Add recipients. Bind user

650) this.width=650; "Src=" 3-wmp_4-s_3311860808.png "title=" 9.png "alt=" Wkiom1ncsaly9winaadgh3jvrp8384.png-wh_50 "/>

650) this.width=650; "Src=" 3-wmp_4-s_483702439.png "title=" 10.png "alt=" Wkiol1ncsxxqjf68aacr-hl9iyy999.png-wh_50 "/>

Configure the action, or you can create it yourself

650) this.width=650; "Src=" 3-wmp_4-s_907599148.png "title=" 11.png "alt=" Wkiom1ncsbaqgwusaadryxwibvo063.png-wh_50 "/>

Action match:

650) this.width=650; "Src=" 3-wmp_4-s_3298946042.png "title=" 12.png "alt=" Wkiol1ncsy6door_aadom3n6ptm670.png-wh_50 "/>

650) this.width=650; "Src=" 3-wmp_4-s_386211659.png "title=" 13.png "alt=" Wkiom1ncsc3xhv4yaajib_473xo415.png-wh_50 "/>

View Alarm Message Send results

650) this.width=650; "Src=" 3-wmp_4-s_2520831142.png "title=" 14.png "alt=" Wkiom1ncsdnydbhlaadjtxjb3ho677.png-wh_50 "/>

WEB Site monitoring

1: Application Set

650) this.width=650; "Src=" 3-wmp_4-s_3210250024.png "title=" 15.png "alt=" Wkiol1ncsbgzpsm5aacfkj9h1ls753.png-wh_50 "/>

2: Create an app set

650) this.width=650; "Src=" 3-wmp_4-s_892891313.png "title=" 16.png "alt=" Wkiom1ncsgoxwi2daacokezn0uy629.png-wh_50 "/>

3: Create a web scene

650) this.width=650; "Src=" 3-wmp_4-s_2636336877.png "title=" 17.png "alt=" Wkiol1ncsdnqq6unaackcxh8cv0738.png-wh_50 "/>

650) this.width=650; "Src=" 3-wmp_4-s_1387365193.png "title=" 18.png "alt=" Wkiol1ncsedgf-dwaaei7cpjkfs057.png-wh_50 "/>

650) this.width=650; "Src=" 3-wmp_4-s_2860637787.png "title=" 19.png "alt=" Wkiom1ncsivbkdn1aad3gv8whoi732.png-wh_50 "/>

4: Create a trigger

Ps: Monitor the return status code of the website if it is not, direct alarm

650) this.width=650; "Src=" 3-wmp_4-s_3754217350.png "title=" 20.png "alt=" Wkiol1ncsghtfe-raadlwfz72m0696.png-wh_50 "/>

650) this.width=650; "Src=" 3-wmp_4-s_2677494106.png "title=" 21.png "alt=" Wkiom1ncsj_td-qvaaefz7sevl0505.png-wh_50 "/>

5: Create graphics, slightly

You can see that the default monitoring items are:

Download speed of the site download the scenario

Download speed of Web page download ofthe step[scenario,,bps]

Steps to fail step faild step Ofscenario[scenario]

Previous error page last ErrorPage Item:web.test.error[scenario]

Page return Code Response code of the step Item:web.test.rspcode[scenario,step]

Web page Response time response for Thestep Item:web.test.time[scenario,step]

Zabbix basic monitoring, port monitoring, web site monitoring, mail alarm

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: 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.