Since the Zabbix comes with a MySQL monitoring template that monitors things less, you should use Percona Zabbix mysql-plugin to monitor MySQL as required by your company's DBA.Percona Zabbix Mysql-plugin is a tool released by Percona that uses Zabbix to monitor MySQL database, which is much more powerful than Zabbix's
After the use of Zabbix for monitoring, often because of the requirements of the project, the need for Zabbix data, two times to share and develop. How to obtain data from Zabbix is a problem to be solved in this practice.
There are two ways to Zabbix data sharing
1 through the database query, get the data. The premise
Zabbix adds cpu usage graph monitoring and zabbix adds cpu graphics
Zabbix version: 3.2.5
If zabbix's windows template does not monitor cpu usage, you can add it in the template.
1. Configure ---> Template OS Windows
2. Monitoring items ----> Add monitoring items
Application set: CPU
3. Graphics ----> Add Images
Take a name, and select the metric
nginx_site.conf file. Each line has a URL, such:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/15/wKiom1QiRf2RCGflAACIA9vwXvo605.jpg "Title =" conf.png "alt =" wkiom1qirf2rcgflaacia9vwxvo605.jpg "/>
Add custom parameters at the end of zabbix_agentd.conf:
UserParameter=nginxSiteDiscovery,bash/etc/zabbix/monitor_scripts/nginx_monitor.shnginxSiteDiscoveryUserParameter=getNginxStatus[*],bash/etc/z
Parameter: Second or # num
Supported value types: float and int
Description: return the difference (max ()-min () between the maximum and minimum values within the specified time interval ()). The time interval can be the second or the number of collected values as the first parameter. The optional second parameter time_shift is supported starting from Zabbix 1.8.2.
Diff
Parameter: Ignore
Supported value types: float, int, str, text, and log
Descript
Templates OS Linux Active --> Items (also change item to Active mode) --> select all and click the following Mass update
Type # check box to change the original Zabbix agent to Zabbix agent (active)
Update # complete
# We found that another Template App Zabbix Agent is associated with this Template. Use the same metho
configuration of email report police
Enter the police configuration interface (Media type S) to create an email alert, as shown in the following figure:
Note that "type" selects the script type, and "script name" fills in the scripting name created above.
Four: Set Zabbix user Alarm email address
Admin-User-admin (Zabbix Administrator) switch to the warning medium and add an email address.V. Defining a
Some advanced Zabbix Functions
Based on the Environment configured in the previous article (SEE), the following describes how to execute remote commands on zabbix agent.
Remote commands are subject to some restrictions:
(1) The following sudu rules must be defined for zabbix users to execute remote commands on the agent:
(2) The agent in active mode is not suppor
Zabbix as a monitoring software is very flexible, supporting the data types are very rich, such as digital (no plus or minus), digital (floating-point), log, text and so on. All we need to do is use the script to collect the data, then Zabbix collect and draw, and set the alarm line. Here we learn to use Zabbix to monitor memcached, PHP-FPM, Tomcat, Nginx, MySQL,
following content to zabbix_agentd.conf:
UserParameter=myhost.user,mysql -u root -ppasswd -e "use you_dbname;select count(*) from user" |tail -1
Explanation:Myhost. user is the Key, which must be used in web settings;-U root-ppasswd is the mysql user name and password;You_dbname: the database you want to operate on;Select count (*) from user SQL statement;
UserParameter=myhost.port1005,netstat -ant | sed -n '1,2!p'|awk '{ if($6!="LISTEN") {if(match($4,"'1005'")) c=c+1}} END{print c}'
The abov
Group
# Now back to the Template page, click Applications-> Create application next to the Template App Nginx Service Template with me
Name: Nginx status
Update
> Create a Metric
# The current location is the application page in the Template App Nginx Service Template. Click Items-> Create item next to the newly created Nginx status with me
Name: nginx active # metric Name
Type: Zabbix agent # monitoring T
Zabbix does not send emails. zabbix sends emails
Environment: CentOS 6.5 mini
Zabbix version: zabbix2.2.29-2.4.3
Exceptions are caused by the following causes:
1. The zabbix. sh script is abnormal.
# Cd/usr/local/zabbix/share/zabbix
Zabbix monitoring environment on-line deployment after a period of time, the alarm suddenly appeared "Zabbix poller processes more than 75% busy"In fact, there are many kinds of monitoring alarm Zabbix, more common than memory exhaustion, network is not through, Io is too slow and this "Zabbix poller processes more th
owner and group to zabbix. zabbix.Edit the zabbix_agentd.conf file, add the code above and below, and restart the zabbix_agentd service.UserParameter = process. php_fpm,/usr/local/zabbix-2.4.4/scripts/processstatus. sh php_fpmUserParameter = process. php_fpm_num,/usr/local/zabbix-2.4.4/scripts/processstatus. sh php_fpm_numUserParameter = process. nginx,/usr/loca
Tags: Oracle ZabbixI. BACKGROUNDReceiving a task that requires monitoring all the table spaces of all databases, willing to encounter a lack of table space leading to the unavailability of the business database, we know that there are some, such as Orabbix or Pyora, that are used by Zabbix to monitor Oracle's data acquisition through Java, So we have to install Java, my previous article has explained the installation process, while the latter although
Linux-Zabbix email alert settings, linux-zabbix alertSystem Environment: Ubuntu 16.04 on Zabbix Server
Install sendmail
sudo apt install sendmail
Test email sending
Echo "text! "| Mail-s title XXX@qq.com
After successful installation, continue to install the email server. Heirloom-mailx in Ubuntu
Apt-get install heirloom-mailx# The yum install mailx // CentOS is
Through the Nginx http_stub_status_module module provides the status information to monitor, so in the agent side need to configure the Nginx state to obtain the script, and add key information, and then configure the server side of the Nginx monitoring template. Please adjust according to your own situation, here is only a simple reference.
The main use of GitHub is the code for this project Zabbix-templates
Agent side
System is centos6.x,
Overview
In the previous blog "Distributed System Monitoring zabbix explains a technology stream Ken", we have explained in detail how to install zabbix. This blog will explain in detail how to use zabbix to monitor another host, and implements the email alarm and notification mechanism.
First, we need to create a host to be monitored and set corresponding monito
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.