第3章 Nagios リモートプラグインエグゼキューターのインストール
ストレージ管理者は、Ceph ストレージクラスターノードを監視して、Nagios プラグイン、Ceph プラグイン、および各 Ceph ノードへの Nagios リモートプラグインエグゼキューター (NRPE) アドオンをインストールできます。
本セクションでは、ホスト名が mon
の Ceph Monitor ノードに NRPE を追加します。監視する必要のある全 Ceph ノードで残りの手順を繰り返します。
3.1. Nagios Remote Plug-In Executor のインストールおよび設定
Nagios Remote Plug-in Executor (NPRE) をインストールし、Nagios Core サーバーと通信するように設定します。
前提条件
- OpenSSL へのアクセス。
- Ceph Monitor ノードへのユーザーレベルのアクセス。
手順
これらのパッケージをノードにインストールします。
[user@mon]# yum install openssl openssl-devel gcc make git
NRPE インストールには、Nagios ユーザーが必要です。したがって、最初にユーザーを作成します。
[user@mon]# useradd nagios [user@mon]# passwd nagios
最新バージョンの Nagios プラグインをダウンロードします。次に、これを作成してインストールします。
[user@mon]# wget http://www.nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz [user@mon]# tar zxf nagios-plugins-2.2.1.tar.gz [user@mon]# cd nagios-plugins-2.2.1 [user@mon]# ./configure [user@mon]# make [user@mon]# make install
NRPE は通信に
xinetd
を使用します。NRPE モジュールをインストールする前にこれをインストールします。[user@mon]# yum install xinetd
Ceph プラグインの最新バージョンをダウンロードします。
[user@mon]# cd ~ [user@mon]# git clone --recursive https://github.com/valerytschopp/ceph-nagios-plugins.git [user@mon]# cd ceph-nagios-plugins [user@mon]# make dist [user@mon]# make install
Nagios NRPE をダウンロード、製造、およびインストールします。
[user@mon]# cd ~ [user@mon]# wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-3.1.0/nrpe-3.1.0.tar.gz [user@mon]# tar xvfz nrpe-3.1.0.tar.gz [user@mon]# cd nrpe-3.1.0 [user@mon]# ./configure [user@mon]# make all [user@mon]# make install-groups-users [user@mon]# make install [user@mon]# make install-config [user@mon]# make install-init
-
/etc/services
ファイルを編集し、サービス文字列nrpe 5666/tcp
を追加します。 ポート
5666
を開き、NRPE との通信を許可します。[user@mon]# firewall-cmd --zone=public --add-port=5666/tcp [user@mon]# firewall-cmd --zone=public --add-port=5666/tcp --permanent
関連情報
- 詳細は、https://github.com/valerytschopp/ceph-nagios-plugins を参照してください。