gpt4 book ai didi

linux - nrpe : Network server bind failure (98: Address already in use)

转载 作者:太空宇宙 更新时间:2023-11-04 10:36:35 26 4
gpt4 key购买 nike

我在同一台机器上安装了 iCinganrpe。我正在使用 nrpe 来监控许多 linux 机器,所以我也在本地安装了 nrpe。

当我在本地启动我的 nrep service nrpe start 时,它会像 /var/log/messages 一样播报错误

nrpe : Network server bind failure (98: Address already in use)

这个问题我google了一下,找到了5666端口的使用情况

[root@cosrh6-74 conf.d]# netstat -apn | grep :5666
tcp 0 0 127.0.0.1:50539 10.104.16.212:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:50608 10.104.16.212:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:41987 10.104.16.210:5666 TIME_WAIT -
tcp 0 1 127.0.0.1:42001 10.104.16.210:5666 SYN_SENT -
tcp 0 0 127.0.0.1:50576 10.104.16.212:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:41927 10.104.16.210:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:52598 10.3.81.172:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:52624 10.3.81.172:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:41962 10.104.16.210:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:41979 10.104.16.210:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:52566 10.3.81.172:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:41928 10.104.16.210:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:52569 10.3.81.172:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:41955 10.104.16.210:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:52587 10.3.81.172:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:50586 10.104.16.212:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:50547 10.104.16.212:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:52588 10.3.81.172:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:50609 10.104.16.212:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:50567 10.104.16.212:5666 TIME_WAIT -
tcp 0 0 127.0.0.1:52592 10.3.81.172:5666 TIME_WAIT -
tcp 0 0 :::5666 :::* LISTEN 757/xinetd

我已将 /etc/nagios/nrpe.cfg 端口从 5666 更改为 56666

如何在icinga2服务器的主机配置中配置不同的端口(不同的端口对应不同的主机)来监控在不同端口运行nrpe的机器?

这样改端口合适吗?或任何其他方式来做到这一点?如果我做错了什么请纠正我?

最佳答案

在每个主机定义中添加:

vars.nrpe_port = <host_nrpe_port>

引用:docs.icinga.org

关于linux - nrpe : Network server bind failure (98: Address already in use),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37167006/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com