我已经安装了nagios服务器,包括nrpe和nagios插件。它工作正常。
但是,在配置完成后,我正在尝试安装nrpe & nagios插件,以便使用nagios服务器进行远程主机监控&我正在运行以下命令进行测试:
/usr/local/nagios/libexec/check_nrpe -H localhost
输出:
CHECK_NRPE: Socket timeout after 10 seconds. (And for some of the services its giving)
CHECK_NRPE: Error - Could not complete SS
我的任务是让一个定制的python脚本(因为我对Bash不好)在远程NRPE客户机上运行,该客户机递归地计算/tmp目录中的文件数。这是我的剧本:
#!/usr/bin/python3.5
import os
import subprocess
import sys
file_count = sum([len(files) for r, d, files in os.walk("/tmp")]) #Recursive check of /tmp
if file_count < 1000:
x = subprocess.Popen(['ech
我无法得到在/var/log/ messages中收到的警告消息的原因:
Apr 10 03:41:23 lsv-vm203 nrpe[85287]: Warning: Could not set effective GID=994
Apr 10 03:41:23 lsv-vm203 nrpe[85287]: Warning: Unable to change supplementary groups using initgroups()
Apr 10 03:41:23 lsv-vm203 nrpe[85287]: Warning: Could not set UID=997
下面是我的配置:
我正在使用Nagios来监视我的服务器,我需要监视不同服务器之间的互联性。例如,假设我有三个服务器A、B&C,所有这些服务器都已经由nagios使用check_ping插件进行监视。
现在我想在内部检查这三台服务器之间的连接,我的意思是
服务器A,B &C应该是可访问的,同样地,从B到,A&C应该是可达的,服务器C也是一样的。
用nagios做这件事的方法是什么?
Server A - can ping to servers B&C
Server B - can ping to servers A&C
Server C - can ping to s
我刚转到了一个新的nagios服务器,所有的旧主机/服务都可以工作了。只有一个主机不允许nrpe检查,从而在nagios服务器上产生一个错误,如标题中所示。
主机在syslog中产生以下错误-
user nrpe[4655]: Host XXX.XXX.XXX.XXX is not allowed to talk to us!
我编辑了/usr/local/nagios/etc/nrpe.cfg,并将XXX.XXX和127.0.0.1添加到allowed_hosts中。
我还将所有:XXX.XXX添加到/etc/hosts.low中。
旧nagios服务器的IP不在这些配置文件中,但是它仍
当在导入os和sys之后用python2调用时,以下函数成功运行,但Nagios nrpe调用时却不正确:
def get_proc1_open_files():
# Set proc1_children list to empty, then run a system command to get a list of proc1 child processes
proc1_children = []
for pids in os.popen("pgrep -P `ps -ef | grep 'proc1 master' | grep -v g
我在Redhat上安装了Nagios,配置如下: /usr/local/nagios/etc/static/commands.cfg define command {
command_name check_service
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_service -a $ARG1$
} 当我尝试手动运行它时: if i try to use the following syntax, I get
我有一个nagios检查报告木偶运行成功/失败。该支票在本地运行良好:
$ sudo -u nrpe /usr/local/nagios/libexec/check_puppet_agent
I AM: nrpe
CRITICAL: Puppet daemon not running or something wrong with process
为了调试目的,我正在回显whoami的输出。然后我得到了关键信息,因为木偶服务停止了,这很好。到现在为止还好。
但是,当我从nagios服务器远程运行检查时,我得到如下信息:
$ /usr/local/nagios/libexec/check_nrp