YAMAHA
you must install the sshpass
Your Gemfile.lock is corrupt
YukiWiki
yumレポジトリの参照先ミラーリストの変更
#released updates [update] name=CentOS-$releasever - Updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/updates/$basearch/ gpgcheck=1
#packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/addons/$basearch/ gpgcheck=1
#additional packages that may be useful [extras] name=CentOS-$releasever - Extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/extras/$basearch/ gpgcheck=1
Zabbix
Zabbix agentインストールスクリプト
Zabbix agent install check
RPMCHK=rpm -qa | grep zabbix-agent
if [ $? -eq 0 ]; then echo "Zabbix agent is aleready installed." exit 10 fi
Zabbix install check
MACHINEARC01=uname -m
case ${MACHINEARC01} in x86_64 ) ARC01=x84_64 ;; i686 ) ARC01=i386 ;; i386 ) ARC01=i386 ;; esac
cd /usr/local/src wget http://repo.zabbix.com/zabbix/2.2/rhel/6/${ARC01}/zabbix-2.2.7-1.el6.${ARC01}.rpm if [ $? -ne 0 ] ; then echo "[FAIL] It does not installed. bye.";exit ; fi
wget http://repo.zabbix.com/zabbix/2.2/rhel/6/${ARC01}/zabbix-agent-2.2.7-1.el6.${ARC01}.rpm if [ $? -ne 0 ] ; then echo "[FAIL] It does not installed. bye.";exit ; fi
rpm -ivh zabbix-* if [ $? -ne 0 ] ; then echo "[FAIL] It does not installed. bye.";exit ; fi chkconfig zabbix-agent on
Zabbix agent conf var
cd /etc/zabbix
cp -p zabbix_agentd.conf zabbix_agentd.conf.original.date +%Y%m%d
echo " "
sleep 2
echo -n "Type server IP address for zabbix check :"
read LISTENIP
sed -i "s/# ListenIP=0.0.0.0/ListenIP=${LISTENIP}/g" ./zabbix_agentd.conf
#sed -i "s/# SourceIP=/SourceIP=${LISTENIP}/g" ./zabbix_agentd.conf
#echo -n "Type server IP address for outgoing connections :" #read OUTIP #sed -i "s/# SourceIP=/SourceIP=${OUTIP}/g" ./zabbix_agentd.conf
echo -n "Type Zabbix server IP address :" read ZABBIXIP sed -i "s/Server=127.0.0.1/Server=${ZABBIXIP}/g" ./zabbix_agentd.conf sed -i "s/ServerActive=127.0.0.1 /ServerActive=${ZABBIXIP}/g" ./zabbix_agentd.conf
sed -i "s/Hostname=Zabbix server/Hostname=${HOSTNAME}/g" ./zabbix_agentd.conf sed -i "s/# Timeout=3/Timeout=10/g" ./zabbix_agentd.conf
Zabbix start
/etc/init.d/zabbix-agent start if [ $? -eq 0 ];then echo "[INFO] Zabbix agent start success!!" else echo "[FAIL] Zabbix agent start failed… bye.";exit fi
Fire wall
echo -n "Do you change iptables config?(y/n):" read IPTBL
if [ ${IPTBL} = "y" ]; then
cd /etc/sysconfig
cp -p iptables iptables.date +%Y%m%d
iptables -A INPUT -s ${ZABBIXIP}/32 -p tcp -j ACCEPT
service iptables save
if [ $? -eq 0 ]; then
echo "[IFNO] iptables config change script success.";
else
echo "[FAIL] Please check iptables config file.";exit
fi
else
echo "[INFO] iptables config does not chanege."
fi
echo "[INFO] Zabbix agent install script success!"
exit 0
Zabbix agentのインストール
※2.2.7 x86_64
wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-2.2.7-1.el6.x86_64.rpm
wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-agent-2.2.7-1.el6.x86_64.rpm
※2.2.7 i386
wget http://repo.zabbix.com/zabbix/2.2/rhel/6/i386/zabbix-agent-2.2.7-1.el6.i386.rpm
wget http://repo.zabbix.com/zabbix/2.2/rhel/6/i386/zabbix-2.2.7-1.el6.i386.rpm
rpm -ivh zabbix*
cd /etc/zabbix/
cp -p zabbix_agentd.conf zabbix_agentd.conf.date +%Y%m%d
vi zabbix_agentd.conf
#SourceIP=127.0.0.1 SourceIP=192.168.1.10 <–監視される側
#Server=127.0.0.1 Server=192.168.1.100 <–Zabbixサーバー
ListenIP=0.0.0.0
ListenIP=192.168.1.10 <–受付IPアドレス
#Hostname=Zabbix server Hostname=Test Server
/etc/init.d/zabbix-agent status
zabbix_agentd は停止しています
/etc/init.d/zabbix-agent start
Starting Zabbix agent:
/etc/init.d/zabbix-agent status
zabbix_agentd (pid 1832 1831 1830 1829 1828 1826) を実行中…
ps aux | grep zabbix
zabbix 1826 0.0 0.0 45824 948 ? S 13:35 0:00 /usr/sbin/zabbix_agentd zabbix 1828 0.0 0.0 45824 952 ? S 13:35 0:00 /usr/sbin/zabbix_agentd zabbix 1829 0.0 0.0 45824 732 ? S 13:35 0:00 /usr/sbin/zabbix_agentd zabbix 1830 0.0 0.0 45824 732 ? S 13:35 0:00 /usr/sbin/zabbix_agentd zabbix 1831 0.0 0.0 45824 732 ? S 13:35 0:00 /usr/sbin/zabbix_agentd zabbix 1832 0.0 0.0 45836 908 ? S 13:35 0:00 /usr/sbin/zabbix_agentd root 1839 0.0 0.0 107448 908 pts/0 S+ 13:35 0:00 grep zabbix
chkconfig zabbix-agent on
chkconfig zabbix-agent –list
zabbix-agent 0:off 1:off 2:on 3:on 4:on 5:on 6:off ログローテーション [#tc9cc6f1]
Zabbix ProxyのActiveモードとPassiveモードの違い
そこで、Passiveモードは監視設定の変更の反映や監視結果の取得など全ての通信をZabbix Serverを起点にすることが可能となります。