zabbix 監控

zabbix 服務端php

[root@localhost ~]# yum install -y epel-release ; yum install -y httpd mysql mysql-libs php php-mysql mysql-server php-bcmath php-gd php-mbstring ; yum install -y zabbix20 zabbix20-agent zabbix20-server  zabbix20-server-mysql zabbix20-web zabbix20-web-mysql net-snmp-develmysql

[root@localhost ~]# vi /etc/my.cnflinux

[mysqld]web

datadir=/var/lib/mysqlsql

socket=/var/lib/mysql/mysql.socksocket

user=mysqlide

symbolic-links=0post

[mysqld_safe]this

log-error=/var/log/mysqld.logrest

pid-file=/var/run/mysqld/mysqld.pid

[mysql]

default-character-set = utf8

[mysqld]

character_set_server = utf8

[root@localhost ~]# /etc/init.d/zabbix-server restart; /etc/init.d/zabbix-agent restart ; /etc/init.d/httpd restart ; /etc/init.d/mysqld restart

[root@localhost ~]# mysql -uroot -p -e  "create database zabbix"

[root@localhost ~]# mysql -uroot -p --default-character-set=utf8 zabbix < /usr/share/zabbix-mysql/schema.sql

[root@localhost ~]# mysql -uroot -p --default-character-set=utf8 zabbix < /usr/share/zabbix-mysql/p_w_picpaths.sql

[root@localhost ~]# mysql -uroot -p --default-character-set=utf8  zabbix < /usr/share/zabbix-mysql/data.sql

[root@localhost ~]# vi /etc/php.ini

date.timezone = 'Asia/Shanghai'

post_max_size = 16M

max_execution_time = 300

max_input_time = 300

[root@localhost ~]# mysql -uroot -e "grant all on *.* to 'zabbix'@'localhost' identified by 'zabbix';"

[root@localhost ~]# vi /etc/zabbix/zabbix_server.conf

DBPassword=zabbix

[root@localhost ~]# /etc/init.d/zabbix-server restart ; /etc/init.d/httpd restart

web 訪問 http://192.168.10.29/zabbix/

web 操做

Continue despite this warning  >>  Next  >>  Next  >>  Test connection  >>  Next  >>  Next  >>  Next  >>  Finish  >>  admin  >>  zabbix

調中文

Profile  >>  Language  >>  Chinese (zh_CN)  >>  Save


zabbix 客戶端

[root@localhost ~]# yum install -y epel-release ; yum install -y zabbix20-agent

[root@localhost ~]# vi /etc/zabbix_agentd.conf

Server=192.168.10.29

ServerActive=0.0.0.0:10050

Hostname=host39

[root@localhost ~]# /etc/init.d/zabbix-agent restart

服務端操做,檢測客戶端主機名,若是能夠正常檢測到,證實通信正常

[root@localhost ~]# zabbix_get -s 192.168.10.39 -p10050 -k"system.hostname"

web 操做

配置-主機-建立主機

主機名稱(自定義)

可見的名稱(自定義)

組(linux servers)

IP地址(客戶端IP)

存檔


至此,zabbix搭建完畢

相關文章
相關標籤/搜索