48th Lesson Zabbix Working principle, installation, configuration introduction

Source: Internet
Author: User
Tags snmp import database

Introduction of monitoring System Foundation and Zabbix
Zabbix working principle and installation configuration
Getting Started with Zabbix configuration
Getting Started with Zabbix configuration

First, monitoring System Foundation and Zabbix Introduction

The famous monitoring tool Zabbix Zennos opennms cacti Nagios.

Cacti collect data, display charts

Nagios has a strong focus on state alarm mechanisms

Zabbix powerful monitoring tools to complete data collection, storage, display, alarm function.

Zabbix has a dedicated agent monitoring tool, he is a distributed monitoring system.


Second, the installation of Zabbix (zabbix-2.4 for example)

1, RPM Package installation,: http://www.zabbix.com/download.php


    • MySQL database is installed, create Zabbix library and authorize Zbxuser user

#mysql

>create database Zabbix cheracter set UTF8;

>grant all on zabbix.* to [e-mail protected] ' 172.16.%.% ' identified by ' zbxpass ';

>grant all on zabbix.* to [e-mail protected] ' node1.magedu.com ' identified by ' zbxpass ';

>flush privilege;

#mysql-uzbxuser-h172.16.100.7-p Test zbxuser User Login Database


    • Installing Zabbix-server requires the following 8 package components

Yum install zabbix-server-2.4. RPM zabbix-server-mysql-2.4. RPM zabbix-get-2.4. Rpm

zabbix-2.4. RPM zabbix-web-2.4. RPM zabbix-web-msyql-2.4. Rpm

zabbix-agent-2.4. RPM zabbix-sender-2.4. Rpm

#cd/etc/zabbix Viewing the Zabbix configuration file

#service httpd start httpd Service

#cd/usr/share/doc/zabbix-server-mysql-2.4.0/create

#ls (three databases Data.sql, Image.sql, Schema.sql)

# MySQL Zabbix < Schema.sql # #注意导入数据库的顺序, Root has no password, MySQL does not add parameters

# MySQL Zabbix < image.sql

# MySQL Zabbix < data.sql

    • Configure Zabbix-server

#vi/etc/zabbix/zabbix_server_conf Modify the value of the price parameter below consistent with this server

Dbhost, DBname, DBuser, Dbpassword, Dbsocket, Dbport

#cd/etc/zabbix

#service zabbix_server Start

#rpm-ql zabbix_server #ss-tnl View Zabbix installation information and boot port information

#vi/etc/php.ini Date.timezone = Asia/shanghai

Browser runs server IP for configuration http://ip/zabbix/setup.php


    • Configuring the Monitoring host (monitoring server itself)

#vi/etc/zabbix/zabbix_agentd.conf

server=127.0.0.1,172.16.100.7 (server-side reserved 127.0.0.1)

serveractive=127.0.0.1,172.16.100.7

Hostname-node1.magedu.com

#service zabbix_agent Start

Web page Configuration Monitoring Server itself


    • Configure monitoring for other Linux hosts

      #scp-R zabbix-2.4/mode2:/root to copy all zabbix-2.4 RPM packages to the Node2 node

      Yum install zabbix-2.4. RPM zabbix-agent-2.4. RPM zabbix-sender-2.4. Rpm

      #vi/etc/zabbix/zabbix_agentd.conf

      server=172.168.100.7 # #指向服务器地址

      serveractive=172.16.100.7 # #指向服务器地址

Hostname=node2.magedue.com

#server zabbix_agent Start

Web page Configuration Monitoring Node2

Configure--host--createhost

Host (resolvable, available IP) (visual host name)

Templates (template)

IPMI (typically without this interface)

Macio (host macros, variables)

Host inventory (add host to Asset list)

Item (Monitoring item)--application (application)

Trigger (trigger) sets a threshold that triggers a time event when the threshold is reached

Event (events)

Action (Action)--(Notice notifications, command commands)

Users (Medie) to set event notifications

Summary: Zabbix requires lamp architecture----ZABBIX Database (Import Database)---Install zabbix_server---httpd configuration

Server configuration file: zabbix_server.conf, monitored configuration file: zabbix-agentd.conf

Four functions of monitoring system: Data acquisition--storage--alarm--Data visualization


2, source installation zabbix::http://www.zabbix.com/download.php

# TAR-ZXVF Zabbix-2.0.0.tar.gz

To create a user:

# Groupadd Zabbix

# useradd-g Zabbix Zabbix

Note: On nodes that have both server and agent installed, it is recommended that you do not run the same user.


To create a database:

Both the server and proxy are dependent on the database and the agent is not required.

Take MySQL database as an example:

mysql> CREATE DATABASE Zabbix CHARACTER SET UTF8 COLLATE utf8_bin;

Mysql> GRANT all on zabbix.* to [e-mail protected] '% ' identified by ' zbpass ';

# Please modify the user name and password as required;

shell> mysql-u<username>-p<password> Zabbix < Database/mysql/schema.sql

# If you only create a database for proxy, import only schema.sql; otherwise, proceed to the following steps;

shell> mysql-u<username>-p<password> Zabbix < Database/mysql/images.sql

shell> mysql-u<username>-p<password> Zabbix < Database/mysql/data.sql

Compile and install Zabbix:

Install both the server and the agent, and support the data into MySQL data, using a configuration command similar to the following:

./configure--enable-server--enable-agent--with-mysql--enable-ipv6--with-net-snmp--with-libcurl--with-ssh2


If you install only server and support data into MySQL data, you can use a configuration command similar to the following:

./configure--enable-server--with-mysql--with-net-snmp--with-libcurl


If you install only proxy and support data into MySQL data, you can use a configuration command similar to the following:

./configure--prefix=/usr--enable-proxy--with-net-snmp--with-mysql--with-ssh2


If you install only the agent, you can use a configuration command similar to the following:

./configure--enable-agent


You can then compile and install Zabbix:

# make # Make Install


Configuration Zabbix:

The server configuration file is zabbix_server.conf, at least it should be configured for the database and other related information;

The agent configuration file is zaabix_agentd.conf, at least the IP address of the server should be specified;

The configuration file of proxy is zabbix_proxy.conf, at least it should specify the hostname of proxy and the IP of server, and the related configuration information such as database;

Start Zabbix:

Server:zabbix_server

Agent:zabbix_agentd

Proxy:zabbix_proxy




48th Lesson Zabbix Working principle, installation, configuration introduction

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.