Zabbix custom monitoring

Source: Internet
Author: User

After zabbix is installed, the template that comes with zabbix can only monitor cp, memory, hard disk usage, and so on. Next we will talk about how to use zabbix to monitor the nginx process of the server.

Zabbix client: 192.168.10.2

Zabbix server: 92.1610.1

Zabbix client settings.

We usually check whether the nginx process is used, for example, ps-ef | grep nginx | grep-c master.

650) this. width = 650; "src ="/e/u261/themes/default/images/spacer.gif "style =" background: url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center; border: 1px solid # ddd; "alt =" spacer.gif "/> 650) this. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/DD/wKioL1RbPmrQ_WHJAABLLNSuRWE853.jpg "title =" 1.png" alt = "wKioL1RbPmrQ_WHJAABLLNSuRWE853.jpg"/>

If the returned value is 1 or not, it is 0.

Modify the zabbix_agentd.conf configuration file

# UserParameter =

Change

UserParameter = nginx. status, ps-ef | grep nginx | grep-c master

In this command, "UserParameter" indicates that this is a user-defined script; "=" indicates the content of the script; "nginx. the status command after "Key", "," is sent to the Agent on Zabbix Server to obtain "nginx. status "is called when the key is requested, and the return value is returned to the Server.

Zabbix server configuration

Add Template:

650) this. width = 650; "src ="/e/u261/themes/default/images/spacer.gif "style =" background: url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center; border: 1px solid # ddd; "alt =" spacer.gif "/> 650) this. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/DE/wKiom1RbPhaiXoRfAAIIOVdCLDM543.jpg "title =" 2.png" alt = "wKiom1RbPhaiXoRfAAIIOVdCLDM543.jpg"/>

Then, create an application set under the template.

650) this. width = 650; "src ="/e/u261/themes/default/images/spacer.gif "style =" background: url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center; border: 1px solid # ddd; "alt =" spacer.gif "/> 650) this. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/DD/wKioL1RbPpDwQBByAAGH-mRDmj4204.jpg "title =" 3.png" alt = "wKioL1RbPpDwQBByAAGH-mRDmj4204.jpg"/>

Create a project

650) this. width = 650; "src ="/e/u261/themes/default/images/spacer.gif "style =" background: url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center; border: 1px solid # ddd; "alt =" spacer.gif "/> 650) this. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/DD/wKioL1RbPqbw2xAFAAI4dO6Oqfg216.jpg "title =" 4.png" alt = "wKioL1RbPqbw2xAFAAI4dO6Oqfg216.jpg"/>

Created successfully

650) this. width = 650; "src ="/e/u261/themes/default/images/spacer.gif "style =" background: url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center; border: 1px solid # ddd; "alt =" spacer.gif "/> 650) this. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/DE/wKiom1RbPl3AdOg_AAEtwmlIjwM119.jpg "title =" 5.png" alt = "wKiom1RbPl3AdOg_AAEtwmlIjwM119.jpg"/>

Create a trigger

650) this. width = 650; "src ="/e/u261/themes/default/images/spacer.gif "style =" background: url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center; border: 1px solid # ddd; "alt =" spacer.gif "/> 650) this. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/DD/wKioL1RbPs_wmnlNAAE3Jy3gLSA154.jpg "title =" 6.png" alt = "wKioL1RbPs_wmnlNAAE3Jy3gLSA154.jpg"/>

Then add a template to zabbix client

650) this. width = 650; "src ="/e/u261/themes/default/images/spacer.gif "style =" background: url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center; border: 1px solid # ddd; "alt =" spacer.gif "/> 650) this. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/DE/wKiom1RbPnyQbeTdAAIeaFVatlY223.jpg "title =" 7.png" alt = "wKiom1RbPnyQbeTdAAIeaFVatlY223.jpg"/>

Then save


Modify the UserParameter of zabbix client and test whether an alarm is reported.

This article from the "openvpn building" blog, please be sure to keep this source http://lovesource.blog.51cto.com/1454821/1573788

Zabbix custom monitoring

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.