第 3 章 Nagios 远程插件执行器安装
作为存储管理员,您可以监控 Ceph 存储集群节点、安装 Nagios 插件、Ceph 插件和 Nagios 远程插件执行器(NRPE)附加组件到每个 Ceph 节点。
为了演示目的,本节将 NRPE 添加到具有主机名 mon 的 Ceph 监控节点。在 Nagios 应监控的所有 Ceph 节点上重复剩余的步骤。
3.1. 安装和配置 Nagios Remote Plug-In Executor 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
安装 Nagios Remote Plug-in Executor(NPRE),并将其配置为与 Nagios 核心服务器通信。
先决条件
- 访问 OpenSSL.
- 对 Ceph 监控节点的用户级访问.
流程
在节点上安装这些软件包:
[user@mon]# yum install openssl openssl-devel gcc make gitNRPE 安装需要 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 installNRPE 使用
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