【问题标题】:Nagios nrpe plugin install on remote hostNagios nrpe 插件安装在远程主机上
【发布时间】:2021-08-09 09:58:34
【问题描述】:

在Centos7上,跟随nrpe plugin install steps,在测试Nagios服务器和远程代理之间的连接时,我得到了这个错误...

/usr/local/nagios/libexec/check_nrpe -H 192.168.50.5
CHECK_NRPE: Error - Could not connect to 192.168.50.5: Connection reset by peer

在 /etc/xinetd.d/nrpe 中,我将 Nagios 服务器的 IP 地址添加到 only_from 字段。

# default: off
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
    disable         = no
    socket_type     = stream
    port            = 5666
    wait            = no
    user            = nagios
    group           = nagios
    server          = /usr/local/nagios/bin/nrpe
    server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd
    only_from       = 127.0.0.1 ::1 {server_IP}
    log_on_success  =
}

然后我重新启动了 xinetd 服务;但是,在检查服务状态时,会出现此错误日志消息...

Aug 09 09:32:21 localhost.localdomain xinetd[1448]: bind failed (Address already in use (errno = 98)). service = nrpe
Aug 09 09:32:21 localhost.localdomain xinetd[1448]: Service nrpe failed to start and is deactivated.

【问题讨论】:

    标签: nagios nrpe xinetd


    【解决方案1】:

    解决方案是不仅要在 /etc/xinetd.d/nrpe 中包含服务器 IP,还要在重新启动 xinetd 服务之前停止 nrpe 服务。

    systemctl stop nrpe
    systemctl restart xinetd
    

    似乎自行重启xinetd未能加载nrpe服务,因为它的端口与现有的nrpe服务冲突。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多