[[Zabbix]]

*説明 [#gd808a91]
Zabbixの監視される側サーバーに導入するエージェント(zabbix-agentd)の導入手順です。~
概ね下記手順でいけます。

*zabbix agentインストール[#zac0573a]
 # cd /usr/local/src 
 # wget http://repo.zabbix.com/zabbix/1.8/rhel/6/x86_64/zabbix-1.8.20-1.el6.x86_64.rpm 
 # wget http://repo.zabbix.com/zabbix/1.8/rhel/6/x86_64/zabbix-agent-1.8.20-1.el6.x86_64.rpm
 
 ※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]
 # cd /etc/logorotate.d/
 # vi zabbix
 /var/log/zabbix/zabbix_agentd.log {
 	missingok
 	monthly
 	notifempty
 	compress
        postrotate
 	   create 0664 zabbix zabbix
           /etc/init.d/zabbix-agent force-reload
        endscript
 }
 # logrotate -dv /etc/logrotate.d/zabbix
 →エラーがでなければOK

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS