In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Introduction to Zabbix:
Zabbix is an enterprise-level open source solution based on WEB interface that provides distributed system monitoring and network monitoring capabilities.
Zabbix can monitor various network parameters to ensure the safe operation of the server system, and provides a flexible notification mechanism to enable system administrators to quickly locate / solve various problems.
Zabbix consists of two parts, zabbix server and optional component zabbix agent.
Zabbix server can provide remote server / network status monitoring, data collection and other functions through SNMP,zabbix agent,ping, port monitoring and other methods.
How it works:
Zabbix consists of several major software components:
Server: zabbix server is a core component to which agent can report availability and integrity information and statistics. All the configuration, data, and business data of the server are stored in the database.
Database storage: all configuration information, including collected data, is stored in the database by zabbix.
Web interface: through a web-based platform, we can access zabbix from anywhere. This web is part of zabbix server and usually runs on the same physical machine as server. (SQLite must be configured on the same physical machine)
Proxy: proxy can collect performance and availability data instead of server. Proxy is an optional part, but it is very useful for reducing the load on zabbix server.
Agent: zabbix agent is deployed on the monitoring target, and the host monitors local resources and applications and reports data to zabbix server.
Several definition components of Zabbix:
Host: the network device you want to monitor, use the ip/ domain name.
Host group: a logical grouping of hosts, which may contain hosts and templates. The hosts and templates in the host group are not connected to each other in any way. Host groups are used when assigning permissions to different users.
Item: some of the data you want to get from the monitoring host
Trigger: define a threshold to see if there is a problem with the data received from item, using logical expressions. When receiving one that exceeds the ratio threshold, the trigger changes from ok to problem. When the received data is below the threshold, the trigger becomes ok.
Event: some interesting things such as trigger state change or discovery mechanism, agent auto-registration has occurred.
Action: a predefined device based on events. An action contains conditions and actions (sending a message).
Escalation: customize in the operation of action, send notifications / execute commands remotely
Media: a means of sending notifications.
Notification: an event is sent to the user through the selected media.
Remote command: predefined remote commands are executed when some conditions are triggered.
Template: entities that are ready to be applied to one or more hosts (items, triggers, graphs, screens,applications, low-level discovery rules, web scenarios). Templates speed up the deployment of monitoring. Large-scale changes are applied to monitoring tasks. The template is directly associated with the host.
Application: logical grouping of item
Web scenario: one or more HTTP requests to check the usability of a website
Frontend: web interface provided by zabbix
Zabbix api: Zabbix API allows you to create, update, and retrieve zabbix objects (likehosts, items, graphs and others) or perform other custom tasks using the json rpc protocol.
Zabbix server: the center of zabbix software for performing monitoring, interacting with proxy and agent, calculating trigger, sending notifications, and central data storage.
Zabbix agent: a process is deployed on the monitoring host to actively monitor local resources and applications.
Zabbix proxy: instead of zabbix server to collect data, instead of server to bear some pressure.
Zabbix installation:
On the server:
Yum install-y gcc*
Yum-y install httpd mysql mysql-server mysql-devel php php-mysql php-common php-mbstring php-gd php-odbc php-pear curl curl-devel net-snmp net-snmp-devel perl-DBI php-xml ntpdate php-bcmath
Synchronize server time:
Server side:
Yum install-y ntp*
Service ntpd start
Chkconfig ntpd on
Client synchronization time:
Yum install-y ntp*
Service ntpd start
Chkconfig ntpd on
Chkconfig ntpdate on
On the server:
Add users and groups needed for Zabbix to run
Useradd zabbix
Start mysql and set password and user authorization
# service mysqld start
# mysqladmin-uroot password '123456'
# mysql-uroot-p
# create database zabbix
# grant all on zabbix.* to zabbix@'%' identified by '123456'
Compile and install Zabbix:
The software package used this time is Zabbix.iso
Compile and install Zabbix:
/ configure-- sysconfdir=/etc/zabbix/-- enable-server-- enable-agent-- with-net-snmp-- with-libcurl-- with-mysql
If you report an error: Not found mysqlclient library
Then: cd / usr/lib64/mysql
Ln-s libmysqlclient_r.so.16.0.0 libmysqlclient_r.so
Ln-s libmysqlclient.so.16.0.0 libmysqlclient.so
Make & & make install
# the path to the sysconfdir configuration file specified here is in the / etc/zabbix/ directory, if it is not specified, it is under / usr/local/etc by default
Copy the startup script on the zabbixserver side and the agent side, and set the execution permissions:
Copy the page file of zabbix to the specified directory (same as the one configured by apache):
Configure php profile: (/ etc/php.ini)
Date.timezone = Asia/Shanghai
Max_execution_time = 300
Max_input_time = 300
Post_max_size = 32m
Memory_limit = 128m
Mbstring.func_overload = 2
Configure the zabbix-server configuration file (define the IP, user name and password of the database):
There are many options, which can be enabled as needed, which are mainly optimized for zabbix task processing.
Start zabbix and apache
Service zabbix_server start
Service httpd start
Browsers access Zabbix:
Check the config file of the web program. If there is no problem, it will display OK, and click finish directly to complete the installation (if there is a problem here, it is usually the permission of the zabbix virtual host directory file, and the process of setting up above will generally not be a problem).
Client:
Install the gcc environment
Yum-y install gcc*
Synchronization time
Ntpdate-u 192.168.88.10
Create a running user
Useradd zabbix
Extract and install zabbix-agent
# tar xf zabbix-2.2.2.tar.gz
# cd zabbix-2.2.2
#. / configure-sysconfdir=/etc/zabbix-enable-agent
# make & & make install
Copy the script needed by the agent side to run
Cp misc/init.d/tru64/zabbix_agentd / etc/init.d/
Chmod + x / etc/init.d/zabbix_agentd
Configure the agent-side profile
Vim / etc/zabbix/zabbix_agentd.conf
# never write it as zabbix_agent.conf here, otherwise the configuration will not take effect
Server=192.168.88.10 # enter the IP address of Server
ServerActive=192.168.88.10 # changed to the IP address of Server
Hostname=Centos-2
# fill in the HostName of this machine, and pay attention to the ability of the server to solve it
UnsafeUserParameters=1
# whether to allow custom key,1 is allowed, 0 is not allowed
Include= etc/zabbix/zabbix_agentd.conf.d/
# Custom agentd configuration file (key) can be written here
Do not customize can not turn on these two options! Or there will be a mistake!
Start the zabbix agent side
Service zabbix_agentd start
Add a new host to the web:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 290
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.