https://www.cnblogs.com/Sungeek/p/9069999.htmlphp
zabbix是一個基於WEB界面的提供分佈式系統監視以及網絡監視功能的企業級的開源解決方案。html
zabbix能監視各類網絡參數,保證服務器系統的安全運營;並提供靈活的通知機制以讓系統管理員快速定位/解決存在的各類問題。python
zabbix由2部分構成,zabbix server與可選組件zabbix agent。mysql
zabbix server能夠經過SNMP,zabbix agent,ping,端口監視等方法提供對遠程服務器/網絡狀態的監視,數據收集等功能,它能夠運行在Linux,Solaris,HP-UX,AIX,Free BSD,Open BSD,OS X等平臺上。linux
LAMP:Linux+Apache+Mysql/MariaDB+Perl/PHP/Python一組經常使用來搭建動態網站或者服務器的開源軟件,自己都是各自獨立的程序,可是由於常被放在一塊兒使用,擁有了愈來愈高的兼容度,共同組成了一個強大的Web應用程序平臺。nginx
L:linuxweb
A:apachesql
N:nginx數據庫
M:mysql,mariaDBapache
P:php,python,perl
關閉SeLinux 臨時關閉:setenforce 0
永久關閉:vi /etc/selinux/config
關閉防火牆
一、臨時關閉
systemctl stop firewalld.service
二、永久關閉
systemctl disable firewalld.service
安裝環境
LAMP
一、安裝apache
yum install -y httpd
httpd服務開機進行自啓
systemctl enable httpd
啓動httpd服務
Systemctl start httpd
二、安裝mysql
由於7版本mysql要收費,因此咱們安裝mariadb
yum install -y mariadb mariadb-server
開機自啓動
Systemctl enable mariadb
運行服務
Systemctl start mariadb
查看Mariadb是否安裝成功
三、安裝php環境
yum install -y php php-mysql
四、安裝zabbix
(1)下載包
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
(2)安裝zabbix的包
yum install -y zabbix-server-mysql zabbix-get zabbix-web zabbix-web-mysql zabbix-agent zabbix-sender
四、建立一個zabbix庫並設置爲utf8的字符編碼格式
create database zabbix character set utf8 collate utf8_bin;
建立帳戶而且受權設置密碼
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
給來自loclhost的用戶zabbxi分配可對數據庫zabbix全部表進行全部操做的權限,而且設定密碼爲zabbix
刷新
flush privileges;
exit退出
五、導入表
切換到此目錄下
cd /usr/share/doc/zabbix-server-mysql-3.2.10/
進行解壓
gunzip create.sql.gz
對錶進行導入
六、配置zabbix server配置文件
配置文件目錄
cd /etc/zabbix
對zabbix_server.conf進行配置
運行zabbix-server服務
開機自啓zabbix-server服務
七、配置php
cd /etc/httpd/conf.d
配置時間
vi zabbix.conf
Systemctl restart httpd
八、登錄zabbix網址設置
192.168.85.11/zabbix
password是咱們設置的數據庫密碼zabbix
登錄帳戶是Admin
密碼是zabbix
九、設置中文
十、對服務器自身進行監控
十一、解決中文亂碼沒法顯示的問題
從咱們電腦win7裏面找到黑體右鍵複製到桌面而後拉到zabbix服務器上面
直接修改字體名字
切換到這個目錄下面: /usr/share/zabbix/fonts
如今的中文字體是顯示正常的了
Sungeek博客
一名運維小菜鳥
http://www.cnblogs.com/Sungeek/
安裝及設置Zabbix-agent
安裝zabbix-agent
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
[root@ecs-5c78-0002 ~]# rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.centos.noarh.rpm
Retrieving https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:zabbix-release-3.4-1.el7.centos ################################# [100%]
[root@ecs-5c78-0002 ~]# yum install zabbix-agent –y
或者使用官網提供的連接,而後rpm -ivh進行安裝:rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.0-1.el7.x86_64.rpm
配置zabbix-agent
[root@ecs-5c78-0002 ~]# vim /etc/zabbix/zabbix_agentd.conf
修改server IP地址
修改成zabbix-server服務端的IP地址
修改ServerActive IP地址
修改成zabbix-server服務器端的IP地址
啓動zabbix-agent並設置開機啓動
[root@ecs-5c78-0002 ~]# systemctl start zabbix-agent.service
[root@ecs-5c78-0002 ~]# systemctl enable zabbix-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service.
---------------------
做者:友人a筆記
來源:CSDN
原文:https://blog.csdn.net/tladagio/article/details/79056421
版權聲明:本文爲博主原創文章,轉載請附上博文連接!
5、安裝及設置Zabbix-agent
安裝zabbix-agent
[root@ecs-5c78-0002 ~]# rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarh.rpm
Retrieving https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:zabbix-release-3.4-1.el7.centos ################################# [100%]
[root@ecs-5c78-0002 ~]# yum install zabbix-agent –y
或者使用官網提供的連接,而後rpm -ivh進行安裝:rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.0-1.el7.x86_64.rpm
配置zabbix-agent
[root@ecs-5c78-0002 ~]# vim /etc/zabbix/zabbix_agentd.conf
修改server IP地址
修改成zabbix-server服務端的IP地址
修改ServerActive IP地址
修改成zabbix-server服務器端的IP地址
啓動zabbix-agent並設置開機啓動
[root@ecs-5c78-0002 ~]# systemctl start zabbix-agent.service
[root@ecs-5c78-0002 ~]# systemctl enable zabbix-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service.
6、Zabbix-server添加監控主機
手動添加監控主機
指定zabbix-agent機器IP
增長監控模板,只有添加了模板纔會真正監控到主機
添加圖形,以便觀察數據
監控成功(客戶端要關閉防火牆或者放通端口,要不ZBX圖標會紅色報錯)
自動發現主機
添加發現規則
查看自動發現的主機
到此,zabbix簡單監控就部署好了。
---------------------
做者:友人a筆記
來源:CSDN
原文:https://blog.csdn.net/tladagio/article/details/79056421
版權聲明:本文爲博主原創文章,轉載請附上博文連接!
(2018-03-01 18:29:21)
標籤: zabbix_agentzabbix_server |
分類: 服務器 |
當跨網段時,zabbix_agentd.conf 中 Server的值要填寫全部的遠程zabbix_server主機的ip地址,甚至要把所在的網關寫上去,以半角逗號「,」分開,以下面配置的紅色字體部分。
ServerActive的值也是填寫遠程zabbix_server的ip地址,EnableRemoteCommands=1 。
### Option: Server
# List of comma delimited IP addresses, optionally in CIDR notation, or hostnames of Zabbix servers.
# Incoming connections will be accepted only from the hosts listed here.
# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally and '::/0' will allow any IPv4 or IPv6 address.
# '0.0.0.0/0' can be used to allow any IPv4 address.
# Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.domain
#
# Mandatory: no
# Default:
# Server=
Server=192.168.1.8,192.168.2.8,192.168.1.0/24,192.168.2.0/24
### Option: ServerActive
# List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks.
# If port is not specified, default port is used.
# IPv6 addresses must be enclosed in square brackets if port for that host is specified.
# If port is not specified, square brackets for IPv6 addresses are optional.
# If this parameter is not specified, active checks are disabled.
# Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
#
# Mandatory: no
# Default:
# ServerActive=
ServerActive=192.168.1.8,192.168.2.8
EnableRemoteCommands=1