开发者社区> 问答> 正文

CHECK_NRPE: Error - Could not complete S?报错

在nagios服务器端执行以下命令报错:

[root@nagios libexec]# ./check_nrpe -H localhost

NRPE v2.12
[root @nagios libexec]# ./check_nrpe -H 192.168.1.18
CHECK_NRPE: Error - Could not complete SSL handshake.
[root @nagios libexec]# ./check_nrpe -H 192.168.1.52
CHECK_NRPE: Socket timeout after 10 seconds.
[root @nagios libexec]# ./check_nrpe -H 127.0.0.1

NRPE v2.12

其中192.168.1.18是本地ip,192.168.1.52是被监控端ip,被监控端执行命令结果如下:

# ./check_nrpe -H 192.168.1.52
NRPE v2.12

客户端nrpe.cfg配置为:

# ALLOWED HOST ADDRESSES
# This is an optional comma-delimited list of IP address or hostnames
# that are allowed to talk to the NRPE daemon.
#
# Note: The daemon only does rudimentary checking of the client's IP
# address.  I would highly recommend adding entries in your /etc/hosts.allow
# file to allow only the specified host to connect to the port
# you are running this daemon on.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd


allowed_hosts=192.168.1.18,127.0.0.1


# SERVER ADDRESS
# Address that nrpe should bind to in case there are more than one interface
# and you do not want nrpe to bind on all interfaces.
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd


#server_address=192.168.1.52


请问是什么错误?另外nagiso nrpe自身有没有日志文件?谢谢!

展开
收起
爱吃鱼的程序员 2020-06-14 22:55:43 653 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    需要在被监控机上添加nagios主机的访问权限:

    vim/usr/local/nagios/etc/nrpe.cf

    allowed_hosts=127.0.0.1,172.16.16.150



    vim/etc/xinetd.d/nrpe 

    only_from=127.0.0.1172.16.16.150



    2020-06-14 22:56:00
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
How to Build a Successful Data 立即下载
Borgaonkar-New-Adventures-In-Spying-3G-And-4G-Users-Locate-Track-And-Monitor 立即下载
Why you should care about data layout in the file system 立即下载