Monitoring Tool---Zabbix (i)

Source: Internet
Author: User
Tags ibm db2 rrdtool snmp mysql import

Comparison of open source monitoring software
    • Cacti (meaning cactus in English)

is a set of PHP, MySQL, SNMP and rrdtool development of network traffic monitoring graphical analysis tool, which through the snmpget to obtain data using RRDtool drawing, simplifying rrdtool use. Provides very powerful data and user management capabilities, specifying that each user can view the tree structure, the host device, and any diagram, as well as user authentication in conjunction with LDAP, as well as customizing the template. In the historical data display monitoring aspect, its function is quite good.

Cacti adds a template that enables monitoring of different devices to be reusable, with customizable drawing capabilities and powerful computing power (data overlay)

    • Nagios

Nagios is an open source, free network monitoring tool that effectively monitors Windows, Linux and UNIX host status, network settings such as switch routers, printers, and more.

The features that Nagios can monitor are:
1, monitoring network services (SMTP, POP3, HTTP, NNTP, ping, etc.);
2, monitor the host resources (processor load, disk utilization, etc.);
3, simple plug-in design allows users to easily expand their services to detect methods;
4, parallel service inspection mechanism;
5, with the ability to define the hierarchical structure of the network, with the "parent" host definition to express the relationship between the network host, this relationship can be used to identify and clarify the host outage or unreachable state;
6, when the service or host problems arise and resolve the alarm sent to the contact person (via email, SMS, user-defined mode);
7, has the definition event handle function, it can obtain more problem localization when the host or the service event occurs;
8, automatic log rollback;
9, can support and implement redundant monitoring of the host;
10, the optional web interface for viewing the current network status, notification and fault history, log files and so on;

    • Ganglia

is a cross-platform, scalable, high- performance distributed monitoring system, such as clusters and grids. It is based on layered design and uses a wide range of technologies to store data with RRDtool. With visual interface, it is suitable for automatic monitoring of cluster system. Its well-designed data structures and algorithms make the connection overhead to the monitored end very low. Tens of thousands of clusters are now using this monitoring system to easily handle 2000-node clustered environments.

The power of ganglia is that the ganglia server is able to collect data from all clients on the same network segment through a client, ganglia the cluster server can collect all client data from its subordinates through a single server.

    • Zabbix

is a web-based distributed monitoring system, support a variety of acquisition methods to collect the client, there is a dedicated agent agent, but also support SNMP, IPMI, JMX, Telnet, SSH and other protocols, it will collect the data stored in the database, and then analyze and collate it, The conditional trigger alarm is reached. Its flexible scalability and rich functionality are not comparable to other monitoring systems.

Conclusion:

From the above various monitoring system comparison, Zabbix all have the superiority, its rich function, the extensible ability, two times development ability and the simple and easy to use characteristic, the reader can construct own monitoring system as long as a little study.

Zabbix reasons to choose Zabbix:

-Easy to install and configure, low learning cost
-Multi-lingual support (including Chinese)
-Free Open source

-Data collection to the database, two times to analyze the monitoring data.
-Automatic discovery of servers and network devices
-Distributed monitoring and web centralized management capabilities
-can be monitored without agents
-User security authentication and soft licensing method
-Set or view monitoring results through the web interface
-Notification functions such as email
Wait a minute

Composition

Zabbix Server: You can provide monitoring of remote server/network status, data collection and other functions through SNMP, zabbixagent, Ping, port monitoring, etc., it can run on Linux, Solaris, HP-UX, AIX, free BSD, Open BSD, OS X and other platforms.

Zabbix agent (optional component): installed on the monitored target server, it mainly completes the hardware information or the operating system related memory, CPU and other information collection.

Life cycle

It is recommended to use Zabbix2.2

Installation Preparation:

Epel source, MySQL installed (yum install mysql-server), Zabbix official warehouse (http://repo.zabbix.com/)

1. Installing the Epel source

# Wget–o/etc/yum.repos.d/epel.repo Http://mirrors.aliyun.com/repo/epel-6.repo

2. Install Zabbix official source code:

#rpm-IVH http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm

To install Zabbix server:

3. Installing the dependency pack Yum install-y OpenIPMI

4. Yum install-y zabbix-server Zabbix-server-mysql

5. Create a database

Mysql> Create DatabaseZabbix;mysql> Grant  All  onZabbix.*  toZabbix@localhostIdentified by"Zabbix_pass"; # mysql-Uzabbix-Pzabbix_pass-hlocalhost Zabbix # test # RPM-QL Zabbix-Server-MySQL import server side data table (Note order): # MySQL-Uzabbix-Pzabbix_pass-Hlocalhost Zabbix</Usr/Share/Doc/Zabbix-Server-Mysql-2.2. One/Create/Schema. SQL <--Import data structure #mysql-Uzabbix-Pzabbix_pass-Hlocalhost Zabbix</Usr/Share/Doc/Zabbix-Server-Mysql-2.2. One/Create/images.sql <--Import picture # MySQL-Uzabbix-Pzabbix_pass-Hlocalhost Zabbix</Usr/Share/Doc/Zabbix-Server-Mysql-2.2. One/Create/Data.sql <--Import data

6. Modify config file # vim/etc/zabbix/zabbix_server.conf <--add Zabbix to use database password

[Email protected] ~]# egrep-v "^#|^$"/etc/zabbix/zabbix_server.conf

Logfile=/var/log/zabbix/zabbix_server.log

Logfilesize=0

Pidfile=/var/run/zabbix/zabbix_server.pid

Dbhost=localhost

Dbname=zabbix

Dbuser=zabbix

Dbpassword=zabbix_pass <--need to modify the same database settings

Dbsocket=/tmp/mysql.sock

Snmptrapperfile=/var/log/snmptt/snmptt.log

Alertscriptspath=/usr/lib/zabbix/alertscripts

Externalscripts=/usr/lib/zabbix/externalscripts

7. Start Zabbix server:

#service zabbix-server Start

# Netstat-ntlpu|grep 10051? Check startup status

# Chkconfig Zabbix-server on? Add boot up

Server-side Installation Zabbix Web:

1. # yum Install Zabbix-web Zabbix-web-mysql

The HTTPD service is installed by default and starts HTTPD

# Chkconfig httpd on? Add boot up

2. Access Http://ip/zabbix into the installation

==> Fix : Modify time Zone # vim/etc/httpd/conf.d/zabbix.conf

3. Login Default User admin password: Zabbix

4. Modifying Fonts

vim/usr/share/zabbix/include/locales.inc.php

Yum-y Install wqy-microhei-fonts? Installing the Chinese font set

Rm-f/etc/alternatives/zabbix-web-font #删除原有字体连接文件

Ln-s/usr/share/fonts/wqy-microhei/wqy-microhei.ttc/etc/alternatives/zabbix-web-font

Install Agent

Both client and server are installed

1. # Yum Install-y zabbix-agent

# vim/etc/zabbix/zabbix_agentd.conf//Modify passive mode IP to Zabbix server IP

Note : (an agent can send data to multiple servers at the same time, multiple IPs separated by commas)

Server: Passive mode, which server is allowed to connect to the agent.

Serveractive: Active mode, to which server to transfer data.

#/etc/init.d/zabbix-agent Start//start Agent

# NETSTAT-LNTP |grep 10050//Authentication port

If the prompt does not work properly, check each configuration file in zabbix_server.conf, Selinux, iptables, etc. Configuration file Check the correct configuration parameters for the following files.

The parameters in the 1./etc/zabbix/zabbix_server.conf.

#
Dbhost=localhost? IP (domain name) address of the database

Dbname=zabbix? Name of the database

Dbuser=zabbix? Users of the database

Dbpassword=zabbix? password for the database

Configuration in the 2./etc/zabbix/web/zabbix.conf.php.

[email protected] ~]# cat
/etc/zabbix/web/zabbix.conf.php

<?php

Zabbix GUI configuration file.

Global $DB;

$DB [' TYPE '] = ' MYSQL '; Database type

$DB [' SERVER '] = ' localhost '; IP (domain name) address of the database

$DB [' PORT '] = ' 0 '; Port of the database

$DB [' DATABASE '] = ' Zabbix '; Name of the database

$DB [' USER '] = ' Zabbix '; Users of the database

$DB [' PASSWORD '] = ' Zabbix '; Password for the database

Schema name. Used for IBM DB2 and PostgreSQL.

$DB [' SCHEMA '] = ";

$ZBX _server = ' localhost '; ? Zabbix-server IP (domain name) address

$ZBX _server_port = ' 10051 '; ? Port of Zabbix-server

$ZBX _server_name = ' Zabbix-xuliangwei '; ? Zabbix-server the identity of the Web interface

$IMAGE _format_default = image_format_png;

?>

Monitoring process

Zabbix-get use

Zabbix-get is a program in Zabbix that is used to obtain data from Zabbix-server to zabbix-agent and can often be used to detect the correct configuration of the authentication agent.

Usage: zabbix_get [-HV]-s

-S: The IP address or host name of the remote zabbix-agent.

-P: The port of the remote zabbix-agent.

-L: This machine goes out of the IP address, for a machine in the case of multiple network cards.

-K: Gets the key used by the remote zabbix-agent data.

Implement monitoring CPU (operation on Zabbix server host)

# yum Install-y zabbix-get//install Zabbix-get tool

# zabbix_get-s 192.168.3.113-k System.cpu.util[,user]

Agent data collection method: Passive, active

Other Agent:snmp, IPMI, Java Gateway

To this record, thank you to observe, to be continued ...

Monitoring Tool---Zabbix (i)

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.