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

Construction and deployment of Zabbix platform based on rhel7.2 (3)

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

Share

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

Construction and deployment of Zabbix platform based on rhel7.2 (3)

1. Optimize the configuration of zabbix server:

What you see at this time is the English page, and we now ask it to display the simplified Chinese page.

(1) because the zabbix library has already set the utf-8 character when installing the database

First of all, make sure that Chinese support is enabled for zabbix:

Description: log in to the data directory of the zabbix server (the previously deployed zabbix data directory is / usr/local/nginx1.10/html/zabbix/), and open the locales.inc.php file.

[root@localhost ~] # cd / usr/local/nginx1.10/html/zabbix/include/

[root@localhost include] # vim locales.inc.php

(2) after logging in to zabbix, click the "user" icon in the upper right corner, and set the language to "Chinese".

(3) View the modified results

(4) solve the problem of Chinese garbled code in zabbix drawing.

Step 1: select a Chinese font from Control Panel-> Font-> under windows.

For example, "italics"

Step 2: copy it to the fonts directory on the web side of zabbix

[root@ ~] # cd / usr/local/nginx1.10/html/zabbix/fonts/

[root@ fonts] # mv / root/simkai.ttf. /

[root@ fonts] # ls

DejaVuSans.ttf simkai.ttf

Note: if the suffix TTF of your simkai file is uppercase, be sure to change it to lowercase ttf.

Step 3: move DejaVuSans.ttf to a different directory

[root@ fonts] # mv DejaVuSans.ttf / tmp/

[root@] # cd / tmp & & ls

DejaVuSans.ttf

Step 4: then modify the font configuration in the code include/defines.inc.php file to replace the font setting from DejaVuSans to simkai

[root@ tmp] # cd / usr/local/nginx1.10/html/zabbix/include

[root@ include] # vim defines.inc.php

In this way, after modification, the Chinese text in the zabbix monitoring drawing will not appear garbled.

II. Installation of zabbix client

Note: since we want to monitor, we need to add the host to be monitored. Before adding the host, we first need to install agent on the tested host. It is relatively easy to install agent. We also follow the process of installing server and download the software package. When compiling, we can only select agent.

192.168.100.120 as the monitored end of zabbix, it provides web and mysql application services.

(1) install zabbix and configure zabbix agent

[root@ src] # tar-zxvf zabbix-3.2.3.tar.

[root@ src] # cd zabbix-3.2.3

[root@ zabbix-3.2.3] # / configure-- prefix=/usr/local/zabbix-- enable-agent & & make & & make install

(2) create zabbix users, create file directories, and change file permissions

[root@ zabbix-3.2.3] # cp misc/init.d/fedora/core/zabbix_agentd / etc/init.d/

[root@ zabbix-3.2.3] # mkdir-p / usr/local/zabbix/logs

[root@ zabbix-3.2.3] # groupadd zabbix

[root@ zabbix-3.2.3] # useradd-g zabbix zabbix

[root@ zabbix-3.2.3] # chown-R zabbix:zabbix / usr/local/zabbix/

[root@ zabbix-3.2.3] # id zabbix

Uid=1000 (zabbix) gid=1000 (zabbix) groups=1000 (zabbix)

[root@ zabbix-3.2.3] # grep zabbix / etc/passwd

Zabbix:x:1000:1000::/home/zabbix:/bin/bash

(3) configure automatic boot

[root@ zabbix-3.2.3] # chkconfig-- add zabbix_agentd

[root@ zabbix-3.2.3] # chkconfig zabbix_agentd on

[root@ zabbix-3.2.3] # chkconfig-- list | grep zabbix_agentd

Zabbix_agentd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

(4) modify the zabbix installation directory in the zabbix boot script

[root@ zabbix-3.2.3] # vim / etc/init.d/zabbix_agentd

(5) reload systemctl

[root@ zabbix-3.2.3] # systemctl daemon-reload

(6) Editing zabbix_agentd.conf files

[root@ zabbix-3.2.3] # cd / usr/local/zabbix/etc/

[root@ etc] # vim zabbix_agentd.conf

91 Server=192.168.100.121

132 ServerActive=192.168.100.121

143 Hostname=192.168.100.120

Note: both Server and ServerActive specify the IP address of zabbixserver, but the difference is that the former is passive and the latter is active. In other words, the configuration of Server is used to allow the 192.168.100.121 ip to come to me to get data. ServerActive's 192.168.100.121 means that the client actively submits data to him.

Hostname=XXX, the name of this definition must be the same as the name of host in the web page.

(7) start zabbix_agentd

[root@ etc] # / etc/init.d/zabbix_agentd restart

Restarting zabbix_agentd (via systemctl): [OK]

[root@ etc] # netstat-lnp | grep zabbix_agentd

Tcp 00 0.0.0.0 10050 0.0.0.015 * LISTEN 2762/zabbix_agentd

(8) exception of port 10050 enabled by firewall

[root@ etc] # firewall-cmd-permanent-add-port=10050/tcp

Success

[root@ etc] # firewall-cmd-- reload

Success

At this point, the basic environment of the zabbix monitoring system has been installed.

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