[[監視システム(NMS)]]
目次~
#contents
**概要 [#n12b416d]
ZABBIX AgentをvCenter Server Appliance 5.5へインストールする際の手順。~
vCSA5.5はSUSE Linux Enterprise 11をベースとしているため、SLE用パッケージを使用してインストールする。~
**インストール手順 [#j497f8ff]
***リポジトリの追加 [#ld180a53]
リポジトリを入手する。~
-リポジトリ追加
# zypper addrepo "http://download.opensuse.org/repositories/server:monitoring/SLE_11_SP3/server:monitoring.repo"
~
Adding repository 'Server Monitoring Software (SLE_11_SP3)' [done]
Repository 'Server Monitoring Software (SLE_11_SP3)' successfully added
Enabled: Yes
Autorefresh: No
GPG check: Yes
URI: http://download.opensuse.org/repositories/server:/monitoring/SLE_11_SP3/
-リポジトリ有効化
# zypper refresh
~
Retrieving repository 'Server Monitoring Software (SLE_11_SP3)' metadata [\]
New repository or package signing key received:
Key ID: A5C23697EE454F98
Key Name: server:monitoring OBS Project <server:monitoring@build.opensuse.org>
Key Fingerprint: 8F3BC8EFF549CDCDA918D981A5C23697EE454F98
Key Created: Fri Apr 18 16:35:12 2014
Key Expires: Sun Jun 26 16:35:12 2016
Repository: Server Monitoring Software (SLE_11_SP3)
Do you want to reject the key, trust temporarily, or trust always? [r/t/a/? shows all options] (r): 【tを入力】
***Zabbix Agentのインストール [#b7776cd3]
-パッケージインストール~
# zypper install zabbix-agent
~
上記のコマンドが正常に動作しない場合はこちらを試す。~
# sudo zypper install 'zabbix-agent'
~
The following NEW package is going to be installed:
zabbix-agent
1 new package to install.
Overall download size: 181.0 KiB. After the operation, additional 626.0 KiB will be used.
Continue? [y/n/? shows all options] (y): 【yを入力】
Retrieving package zabbix-agent-2.2.9-1.1.x86_64 (1/1), 181.0 KiB (626.0 KiB unpacked)
Retrieving: zabbix-agent-2.2.9-1.1.x86_64.rpm [done (0 B/s)]
Installing: zabbix-agent-2.2.9-1.1 [done]
Additional rpm output:
warning: /var/cache/zypp/packages/server_monitoring/x86_64/zabbix-agent-2.2.9-1.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID ee454f98
-起動設定~
# chkconfig zabbix-agentd on
~
実行時にランレベル4で登録ができなかったとのエラーが出るが、vCSAの起動レベルは3であるため無視する。~
***Zabbix Agentの動作設定 [#ve0ab4e7]
/etc/zabbix/zabbix-agentd.confに設定を行う。~
代表的な設定項目は以下。~
|Server|パッシブ監視を行うZABBIX Serverのアドレスを設定。Zabbixサーバの送信元アドレスが複数存在する場合にはカンマ区切りで複数を設定可能。(最大2000文字分まで登録可能)|
|ServerActive|アクティブ監視を行うZABBIX Serverのアドレスを設定。複数のZabbixサーバを設定することも可能だが、それら全てにアクティブ監視の結果が送信される。同一サーバを複数登録すると、ログ監視にて同じ内容の行が多重に送信されるため注意すること。|
|Hostname|ZABBIX Serverに登録したホスト名を設定。|
|HostnameItem|システムのホスト名を登録するホスト名に指定する場合にはこちらを使用する。(HostnameItem=system.hostname)|
|EnableRemoteCommands|リモートコマンドの有効化設定。(0=無効、1=有効)|
***Zabbix Agentの起動 [#m8f27391]
Zabbix Agentを手動にて起動する。~
# /etc/init.d/zabbix-agentd start
~
起動後、/var/log/zabbix/zabbix_agentd.logに以下のログが記録される。~
~
22564:20150502:174531.777 Zabbix Agent stopped. Zabbix 2.2.9 (revision 52686).
23315:20150502:174531.873 Starting Zabbix Agent [vcsa5.localnet10.asabiya.net]. Zabbix 2.2.9 (revision 52686).
23315:20150502:174531.873 using configuration file: /etc/zabbix/zabbix-agentd.conf
23316:20150502:174531.874 agent #0 started [collector]
23318:20150502:174531.875 agent #2 started [listener #2]
23319:20150502:174531.875 agent #3 started [listener #3]
23317:20150502:174531.875 agent #1 started [listener #1]
23320:20150502:174531.877 agent #4 started [active checks #1]
***iptables設定 [#l2efd468]
vSphere 6以降はiptablesによるパケットフィルタが設けられているため、Zabbixで使用するポートを開放する必要がある。
-ポート開放
iptables -A INPUT -m state --state NEW -p tcp --dport 10050 -j ACCEPT
-設定の保存
iptables-save
-設定確認
# iptables -L | grep zabbix
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:zabbix-agent
**参考 [#bfd38974]
[[パッケージのインストールserver:monitoring / zabbix-agent:http://software.opensuse.org/download/package?project=server:monitoring&package=zabbix-agent]]