Zabbix basic configuration and monitoring host

Source: Internet
Author: User

Monitoring host version requires the Zabbix Agent to be installed on the monitored host

Monitor Host Installation Zabbix-agent

First, you need to install the agent on the monitored host, you can download the pre-compiled rpm for installation: Http://www.zabbix.com/download

can also be source installation, similar to the installation of the server, just a place there is a difference, is the configuration of the parameters only one:

$./configure–prefix=/home/zabbix--enable-agent

Configure Agent

Take the RPM installation as an example, the agent configuration file location after installation:/etc/zabbix/zabbix_agentd.conf, the main need to modify the following 2 items:

server=192.168.0.41

serveractive=192.168.0.41:10051

After the modification is complete, restart the Zabbix-agent service.

Configuring the monitoring host in Zabbix

Menu path: config-"host,

Click on the top right corner of the Create Host button, in the interface to fill in the necessary information, host name and IP address, group there Select a predefined "Linux servers".

Add monitoring items and charts

Add the main machine to add monitoring items, menu path: Configuration-"Host, click on the host name, and then click" Monitoring Items "

Then click "Create Monitoring Item", we here to try to monitor the CPU idle ratio, this configuration key is the key value, the specific key value of the definition please refer to the Zabbix online documentation,

Data updates time (data acquisition frequency), historical data retention time, and other information using default values.

After creating the monitoring items, you can build a chart for the monitoring items, which is relatively simple:

You can then click "Preview" to see the effect:

Problems with Chinese characters in charts

Zabbix default uses the Dejavusans font to generate dynamic text in the chart, so when the interface is switched to Chinese, the Chinese characters in the chart are not normal because of the lack of the corresponding font file, Chinese characters will be displayed as a small square.

Online Search Solution: http://pengyao.org/zabbix-frontend-graph-chinese.html. is to replace the font that Zabbix uses to generate the chart.

OL 7.1 DVD already contains the article said in the boldface font file, rpm file name: wqy-microhei-fonts-0.2.0-0.12.beta.el7.noarch.rpm

Install this blackbody font file, and then copy the Blackbody font file to the directory where the font files are stored in Zabbix:

#cp/usr/share/fonts/wqy-microhei/wqy-microhei.ttc/var/www/html/zabbix/fonts/wqy-microhei.ttf

Then modify the/var/www/html/zabbix/include/defines.inc.php to replace the "Dejavusans" with "Wqy-microhei" in multiple places.

Restart the httpd service, Chinese characters on the chart show normal.

Early warning

Define triggers: (we define a system CPU idle trigger that emits a warning message when it is less than 40%)

Then define an action that specifies the action to be performed when the trigger triggers:

Note I only choose through email here, and in order to ensure that email can send alert messages, you need to set the "Alarm media type", in the menu "management"-"alarm Media type" inside select email, and then enter the mail server information:

We simulate some of the pressure on the host, so that the system CPU idle down to 40%, the system will be alerted on the page, but also send mail:

Do not install agent monitoring host availability

Zabbix can also implement some very simple monitoring, only by means of ping, to determine the host State, this monitoring is not necessary to install agent, such a way for those who are more incompatible with the agent scenario is more applicable, you can achieve the most current usability monitoring.

This kind of monitoring and the previous monitoring way is different mainly in the monitoring item type, the type choice is "The simple check".

Simple monitoring is not for Ping, but for fping, so before applying this monitoring item, make sure that fping has been installed and that Zabbix has execute permissions.

Installation process is not said, relatively simple, mainly the permissions of the program, in order to ensure that Zabbix can access fping, and to perform as root, you must ensure that fping with "sticky bit (sticky)":

#chmod 4755/usr/sbin/fping

If fping can ping, the return value of the monitoring item is 1, otherwise it is 0.

Note that the host interface is actually a reference to the definition of the host, and the host definition there can actually be casually write IP address, Can be written in 127.0.0.1, because the system will not really verify that the address of the 192.168.0.32 10050 port is running agent, the reason is still write 192.168.0.32 is to look at the convenience, know each host corresponding address, in fact fping Find the host address, which is found in the key value string.

After defining this monitoring item, the subsequent settings such as triggers and actions are the same as the way the agent is installed.

Zabbix basic configuration and monitoring host

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.