Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[Zabbix] configuration details

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

* zabbix****

Zabbix

Server (agent): 172.25.264.165

Proxy (Agent): 172.25.254.161

Agent: 172.25.254.164

one。 Install the required software packages for zabbix

(1) yum install

Zabbix-server-2.4.5-1.el6.x86_64.rpm

Zabbix-server-mysql-2.4.5-1.el6.x86_64.rpm

Zabbix-web-2.4.5-1.el6.noarch.rpm

Zabbix-web-mysql-2.4.5-1.el6.noarch.rpm

Zabbix-2.4.5-1.el6.x86_64.rpm

Fping-2.4b2-16.el6.x86_64.rpm

Php-bcmath-5.3.3-26.el6.x86_64.rpm

Php-mbstring-5.3.3-26.el6.x86_64.rpm

Iksemel-1.4-2.el6.x86_64.rpm-y

(2) agent, the software package needed by the monitored end

Yum install

Zabbix-2.4.5-1.el6.x86_64.rpm

Zabbix-agent-2.4.5-1.el6.x86_64.rpm

(3) configure mysql database

/ etc/init.d/mysqld start

Mysql

Mysql > create database zabbix character set utf8 collate utf8_bin

Mysql > grant all privileges on zabbix.* to zabbix@localhost identified by 'hxl123'

Mysql > quit

Cd / usr/share/doc/zabbix-server-mysql-2.4.5/create

Mysql-uzabbix-phxl123 zabbix

< schema.sql stop here if you are creating database for Zabbix proxy ## mysql -uzabbix -phxl123 zabbix < p_w_picpaths.sql mysql -uzabbix -phxl123 zabbix < data.sql (4)配置zabbix server vim /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=hxl123 (5)配置php(实则就是配置了一个timezone) vim /etc/httpd/conf.d/zabbix.conf php_value max_execution_time 300 php_value memory_limit 128M php_value post_max_size 16M php_value upload_max_filesize 2M php_value max_input_time 300 php_value date.timezone Asia/Shanghai (6)访问,直接在浏览器输入http:/172.25.254.165/zabbix 二.添加agent主机 (1)agent,被监控端所需软件包 yum install(rpm安装) zabbix-2.4.5-1.el6.x86_64.rpm zabbix-agent-2.4.5-1.el6.x86_64.rpm (2)配置 vim /etc/zabbix/zabbix_agentd.conf Server=172.25.254.165 ServerActive=172.25.254.165 Hostname=server4.example.com [主机名需要有解析,这是自己的] 启动 zabbix agent service zabbix-agent start (3)1.在zabbix server 上添加自动发现功能 点击 Configuration ->

Actions-> Create action is set as shown in the following figure:

Add a name and retrieve the scope of ip

two。 Custom Configuration of actions, select Event source as Auto registration,Create action

The Conditions tab can be kept by default.

The Operations tab is added as follows:

Add host: auto-registered hosts are added to the hosts list

Add to host groups: automatically registered hosts join the linux servers group (group name can be customized)

Link to templates: auto-register host application template Template OS linux

3.Configuration-> Hosts Click the all on the side to view all hosts

3. The Agent host is set to actively push monitoring information.

(1) change the configuration file / etc/zabbix/zabbix_agentd.conf

# server=172.25.254.165 [comment out]

StartAgents=0 [changed to 0]

ServerActive=172.25.254.165 [reserved]

(2) Clone items and regenerate the Zabbix agent (active) type (take Template OS Linux as an example)

1. Find Template OS Linux under Configuration of templates, select fullclone, and rename it to Template OS Linux active

two。 Enter Template OS Linux active and set all the items to active type (for some projects with incomplete settings, chase their source items, fullclone them in the same way, and then re-link them into Template OS Linux active, so that all of them are of active type)

3. Then add the Template OS Linux active template to the agent host template (delete the previous link first)

The figure shows:

four。 Add agent proxy (proxy host: 172.25.254.161 server1.example.com)

(1) download the software package

Fping-2.4b2-16.el6.x86_64.rpm zabbix-2.4.5-1.el6.x86_64.rpm

Zabbix-proxy-2.4.5-1.el6.x86_64.rpm zabbix-proxy-mysql-2.4.5-1.el6.x86_64.rpm

Mysql-server

(2) configuration database

/ etc/init.d/mysqld start

Mysql

Mysql > create database zabbix character set utf8 collate utf8_bin

Mysql > grant all privileges on zabbix.* to zabbix@localhost identified by 'hxl123'

Mysql > quit

Cd / usr/share/doc/zabbix-server-mysql-2.4.5/create

Mysql-uzabbix-phxl123 zabbix < schema.sql

(3) configuration file

Vim / etc/zabbix/zabbix_proxy.conf

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=hxl123

/ etc/init.d/zabbix-proxy start

Vim / etc/zabbix/zabbix_agent.conf

ServerActive=172.25.254.161

Hostname=server4.example.com

five。 Expand mysql database information and load percona-zabbix-templates-1.1.6-1.noarch.rpm

(1) download the installation file (yum,rpm)

(2) cd / var/lib/zabbix/percona/templates

Vim / var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php.cnf

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: 0

*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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report