第 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 监控节点的用户级访问.

流程

  1. 在节点上安装这些软件包:

    [user@mon]# yum install openssl openssl-devel gcc make git
  2. NRPE 安装需要 Nagios 用户。因此,请首先创建用户:

    [user@mon]# useradd nagios
    [user@mon]# passwd nagios
  3. 下载最新版本的 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
  4. NRPE 使用 xinetd 进行通信.安装 NRPE 模块前安装它:

    [user@mon]# yum install xinetd
  5. 下载 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
  6. 下载、制作并安装 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
  7. 编辑 /etc/services 文件,并添加服务字符串 nrpe 5666/tcp
  8. 打开端口 5666,以允许与 NRPE 通信:

    [user@mon]# firewall-cmd --zone=public --add-port=5666/tcp
    [user@mon]# firewall-cmd --zone=public --add-port=5666/tcp --permanent
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部