16
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS6をzabbixで監視する

Last updated at Posted at 2014-06-21

既存のzabbixサーバがある環境で、zabbix-agentをインストールして、監視対象とする。

zabbix-agentのインストール

標準のyumリポジトリにはパッケージが無いので、zabbixリポジトリを使えるようにする。

# rpm -ivh http://repo.zabbix.com/zabbix/2.0/rhel/6/x86_64/zabbix-release-2.0-1.el6.noarch.rpm
# yum install -y zabbix-agent

サーバ側に併せて特定リビジョン入れるなら↓(Z,Xを合わせる)

# yum install -y zabbix-agent-2.0.Z-X.el6

監視できるようにその他設定

agentが見るサーバの設定

/etc/zabbix/zabbix-agentd.conf
85
86  Server=サーバのIP/Hostname
87
.
.
126
127 ServerActive=サーバのIP/Hostname
128
.
.
137
138 Hostname=自身のHostname
139
.
.

zabbix-agentの起動と自動起動の設定

# service zabbix-agent status
zabbix_agentd は停止しています
# service zabbix-agent start
Starting Zabbix agent:                                     [  OK  ]
# service zabbix-agent status
zabbix_agentd (pid 10113 10112 10111 10110 10109 10107) を実行中...

# chkconfig zabbix-agent --list
zabbix-agent    0:off   1:off   2:off   3:off   4:off   5:off   6:off
# chkconfig zabbix-agent on
# chkconfig zabbix-agent --list
zabbix-agent    0:off   1:off   2:on    3:on    4:on    5:on    6:off

firewall(iptables)の設定

/etc/sysconfig/iptables
# ↓をREJECT行の前に入れておく
-A INPUT -p tcp --dport 10050 -j ACCEPT

あとは、サーバ側でホスト追加すればOK

16
17
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?