此内容没有您所选择的语言版本。

Chapter 4. Configure the Nagios Core Server


After configuring NRPE on a Ceph host, configure the Nagios Core Server to recognize and monitor the host.

4.1. Install the check_nrpe Plug-in

Copy to Clipboard Toggle word wrap
[user@nagios]# cd ~
[user@nagios]# wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-3.1.0/nrpe-3.1.0.tar.gz
[user@nagios]# tar xvfz nrpe-3.1.0.tar.gz
[user@nagios]# cd nrpe-3.1.0
[user@nagios]# ./configure
[user@nagios]# make check_nrpe
[user@nagios]# make install-plugin

4.2. Check to Ensure Connectivity

Ensure that the make and install procedures worked and that there is connectivity between the Nagios Core server and the remote host containing NRPE.

Copy to Clipboard Toggle word wrap
[user@nagios]# /usr/local/nagios/libexec/check_nrpe -H <IP-address-of-remote-host>

It should echo NRPE v3.1.0-rc1 if it is working correctly.

4.3. Create a Configuration for the Remote Host

Copy to Clipboard Toggle word wrap
[user@nagios]# cd /usr/local/nagios/etc/objects
[user@nagios]# cp localhost.cfg mon.cfg

Replace localhost with the hostname of the remote host, and the loopback IP address with the IP address of the remote host. Finally, delete or comment out the Host Group definition.

Change the file ownership to nagios.

Copy to Clipboard Toggle word wrap
[user@nagios]# chown nagios:nagios mon.cfg

Add a cfg_file= reference to the mon.cfg file in /usr/local/nagios/etc/nagios.cfg.

Copy to Clipboard Toggle word wrap
[user@nagios]# vim /usr/local/nagios/etc/nagios.cfg

For example:

Copy to Clipboard Toggle word wrap
cfg_file=/usr/local/nagios/etc/objects/mon.cfg

Then, restart the Nagios server.

Copy to Clipboard Toggle word wrap
[user@nagios]# systemctl restart nagios
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat, Inc.