Zabbix安裝部署
第一章Zabbix安裝部署文檔
一、lamp環境部署(yum方式)
1.系統環境
server端:192.168.46.138
client端;192.168.46.130,192.168.46.134,192.168.46.135
2.關閉iptables和selinux
iptables -F && /zh-cn/images/localimage.png") no-repeat scroll center;border:1px solid rgb(221,221,221);" alt="spacer.gif" height="138" width="554"/>
客戶端安裝agentd
使用腳本的方式,腳本如下:
#!/bin/bash #auto install zabbix #by jfedu.net 2017 ############# ZABBIX_SOFT="zabbix-3.2.7.tar.gz" INSTALL_DIR="/usr/local/zabbix/" SERVER_IP="192.168.46.138" IP=`ifconfig|grep Bcast|awk ‘{print $2}‘|sed ‘s/addr://g‘` AGENT_INSTALL(){ yum -y install curl curl-devel net-snmp net-snmp-devel perl-DBI groupadd zabbix; useradd -g zabbix zabbix; usermod -s /sbin/nologin zabbix tar -xzf $ZABBIX_SOFT; cd `echo $ZABBIX_SOFT|sed ‘s/.tar.*//g‘` ./configure --prefix=/usr/local/zabbix --enable-agent&&make install if [ $? -eq 0 ]; then ln -s /usr/local/zabbix/sbin/zabbix_* /usr/local/sbin/ fi cd /opt/; cd zabbix-3.2.7 cp misc/init.d/tru64/zabbix_agentd /etc/init.d/zabbix_agentd; chmod o+x /etc/init.d/zabbix_agentd #config zabbix agentd cat >$INSTALL_DIR/etc/zabbix_agentd.conf<<EOF LogFile=/tmp/zabbix_agentd.log Server=$SERVER_IP ServerActive=$SERVER_IP Hostname = $IP EOF #start zabbix agentd /etc/init.d/zabbix_agentd restart } AGENT_INSTALL |
安裝完成之後,到server web上查看,發現都已經正常
2.Snmp方式
四、zabbix郵件監控
1.配置郵件服務器
AdministrationàMedia typesàCreate media type,填寫郵件服務器信息
2.配置用戶(接收報警郵件)
3.添加觸發器
ActionàNew condition選擇“Trigger serverity>=Warning”;
Operationsà設置報警間隔為60s,自定義報警信息,報警信息發送至administrators組
Recovery operations à自定義恢復信息,恢復信息發送至administrators組
4.測試
server web查看
郵箱查看
本文出自 “zhaoyfcomeon-Linux愛好者” 博客,請務必保留此出處http://zhaoyfcomeon.blog.51cto.com/8429349/1956927
Zabbix安裝部署