Monitoring Tool --- Zabbix (1) and monitoring tool --- zabbix

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

Monitoring Tool --- Zabbix (1) and monitoring tool --- zabbix
Comparison of open-source monitoring software

  • Cacti(Cactus)

It is a set of network traffic monitoring graphical analysis tools developed based on PHP, MySQL, SNMP and RRDtool. It uses snmpget to obtain data and uses RRDtool to plot and simplify RRDtool usage. It provides powerful data and user management functions, allowing each user to view the tree structure, host devices, and any image. It can also be used with LDAP for user authentication, you can also customize templates. In terms of historical data display and monitoring, its functions are quite good.

By adding templates, Cacti makes monitoring and adding different devices reusable and supports custom plotting and powerful computing capabilities (Data superposition)

  •  Nagios

Nagios is an open-source free network monitoring tool that can effectively monitor the status of Windows, Linux and Unix hosts, network settings such as vswitches and routers, and printers.

Nagios can monitor the following functions:
1. Monitor network services (SMTP, POP3, HTTP, NNTP, PING, etc );
2. Monitor host resources (processor load, disk utilization, etc );
3. SimplyPlug-in DesignThis allows you to easily expand your service detection methods;
4. Parallel service check mechanism;
5. Have DefinitionsNetwork Hierarchy"Parent" host definition is used to express the relationship between network hosts. This relationship can be used to identify and clarify host downtime or inaccessibility;
6. When a service or host problem occurs or is resolved, the alarm is sent to the contact (via EMail, SMS, or user-defined method );
7. You can define the event handle function to locate more problems when a host or service event occurs;
8. Automatic Log rollback;
9. Support and monitor the redundancy of hosts;
10. An optional WEB interface is used to view the current network status, notification and fault history, and log files;

  • Ganglia

Is a cross-platform, scalable,High PerformanceDistributed monitoring system, such as cluster and grid. It is based onHierarchical DesignRRDtool is widely used to store data. It has a visual interface and is suitable for automatic monitoring of Cluster Systems. Its well-designed data structures and algorithms reduce the connection overhead from the monitoring end to the monitored end. Tens of thousands of clusters are currently using this monitoring system to easily process cluster environments with 2000 nodes.

Ganglia is powerful in that the ganglia server can collect data from all clients in the same network segment through one client, and the ganglia cluster server can collect data from all clients under it through one server.

  • Zabbix

Is a distributed monitoring system based on web interfaces. It supports various collection methods for clients, dedicated Agent, and SNMP, IPMI, JMX, Telnet, SSH, and other protocols, it stores the collected data in the database and analyzes and sorts it to trigger an alarm when the conditions are met. Its flexible scalability and rich functions are incomparable to other monitoring systems.

Mysql> create database zabbix; mysql> grant all on zabbix. * to zabbix @ localhost identified by "zabbix_pass"; # mysql-uzabbix-pzabbix_pass-hlocalhost zabbix # test # rpm-ql zabbix-server-mysql import server data tables (note the sequence ): # mysql-uzabbix-pzabbix_pass-hlocalhost zabbix </usr/share/doc/zabbix-server-mysql-2.2.11/create/schema. SQL <-- import data structure # mysql-uzabbix-pzabbix_pass-hlocalhost zabbix </usr/share/doc/zabbix-server-mysql-2.2.11/create/images. SQL <-- Import image # mysql-uzabbix-pzabbix_pass-hlocalhost zabbix </usr/share/doc/zabbix-server-mysql-2.2.11/create/data. SQL <-- import data

6.Modify configuration file# Vim/etc/zabbix/zabbix_server.conf <-- add zabbix to use the Database Password

[Root @ zabbix-server ~] # 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<-- You need to modify the same database settings.

DBSocket =/tmp/mysql. sock

SNMPTrapperFile =/var/log/snmptt. log

AlertScriptsPath =/usr/lib/zabbix/alertscripts

ExternalScripts =/usr/lib/zabbix/externalscripts

7.Start zabbix server:

# Service zabbix-server start

# Netstat-ntlpu | grep 10051 restart check startup status

# Chkconfig zabbix-server on startup

Install zabbix web on the server:

1. # yum install zabbix-web-mysql

Httpd service is installed by default and httpd is started.

# Chkconfig httpd on startup

2. Access http: // ip/zabbix to install

==>Solution: Modify the time zone # vim/etc/httpd/conf. d/zabbix. conf

3.LoginDefault admin password: zabbix

4.Modify font

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

Yum-y install wqy-microhei-fonts

Rm-f/etc/alternatives/zabbix-web-font # Delete the original font connection file

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

Install agent

Both the client and server are installed.

1. # yum install-y zabbix-agent

# Vim/etc/zabbix/zabbix_agentd.conf // modify the passive mode IP address to zabbix server ip Address

Note(An Agent can send data to multiple servers at the same time. Multiple Ip addresses are separated by commas)

Server: passive mode. Which Server is allowed to connect to the Agent.

ServerActive: the server to which data is transmitted in active mode.

#/Etc/init. d/zabbix-agent start // start the agent

# Netstat-lntp | grep 10050 // verify the port

 

Check the configuration files, Selinux, Iptables, and so on in zabbix_server.conf. In the configuration file, check the correct configuration parameters of the following files.

1. Parameters in/etc/zabbix/zabbix_server.conf.

#
DBHost = localhost hosts IP address of the database (domain name)

DBName = Name of the zabbix Alipay Database

DBUser = zabbix users database user

DBPassword = password of the zabbix connector Database

2. configuration in/etc/zabbix/web/zabbix. conf. php.

[Root @ linux-node1 ~] # Cat
/Etc/zabbix/web/zabbix. conf. php

<? Php

// Zabbix GUI configuration file.

Global $ DB;

$ DB ['type'] = 'mysql'; // Database TYPE

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

$ DB ['Port'] = '0'; // database PORT

$ DB ['database'] = 'zabbix'; // DATABASE Name

$ DB ['user'] = 'zabbix'; // Database USER

$ DB ['Password'] = 'zabbix'; // Database PASSWORD

// Schema name. Used for IBM DB2 and PostgreSQL.

$ DB ['scheme'] = ";

$ ZBX_SERVER = 'localhost'; ß Zabbix-Server IP address (domain name)

$ ZBX_SERVER_PORT = '000000'; configure the port number of Zabbix-Server.

$ ZBX_SERVER_NAME = 'zabbix-Xuliangwei '; ID of the ß Zabbix-Server web Interface

$ IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;

?>

Monitoring Process

Use Zabbix-Get

Zabbix-Get is a program in Zabbix. It is used to obtain data from Zabbix-Server to Zabbix-Agent. It can usually be used to check whether the Agent configuration is correct.

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: the IP address from the local machine. It is used when multiple NICs exist in one machine.

-K: The Key used to obtain the remote Zabbix-Agent data.

Monitor cpu (operations on zabbix server host)

# Yum install-y zabbix-get // install zabbix-get

# Zabbix_get-s 192.168.3.113-k system. cpu. util [, user]

Agent data collection methods: passive and active

Other Agent: SNMP, IPMI, Java Gateway

 

Here is the record. Thank you for watching it. It will be continued...

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.