Chinaunix
标题:
nagios所有监控出的disk数据是localhost的数据
[打印本页]
作者:
asacml
时间:
2011-11-14 10:54
标题:
nagios所有监控出的disk数据是localhost的数据
本帖最后由 asacml 于 2011-11-14 12:10 编辑
nagios3.3.1版本
被监控机的cfg是拷贝localhost.cfgde
在被监控机执行,可以得到本机的/usr的真实的数据,但在nagios显示却是nagios服务器的数据
[root@fs01 /usr/local/libexec/nagios]# ./check_disk -w 20% -c 10% -p /usr
DISK OK - free space: /usr 22012 MB (87% inode=94%);| /usr=3138MB;21870;24604;0;27338
被监控机的cfg配置
define service{
use local-service ; Name of service template to use
host_name fs01
service_description /usr
check_command check_local_disk!20%!10%!/usr
}
被监控机的nrpe.cfg配置
command[check_root]=/usr/local/libexec/nagios/check_disk -w 20% -c 10% -p /
command[check_var]=/usr/local/libexec/nagios/check_disk -w 20% -c 10% -p /var
command[check_tmp]=/usr/local/libexec/nagios/check_disk -w 20% -c 10% -p /tmp
command[check_usr]=/usr/local/libexec/nagios/check_disk -w 20% -c 10% -p /usr
command[check_media/data]=/usr/local/libexec/nagios/check_disk -w 20% -c 10% -p /media
nagios服务器commands的配置
define command{
command_name check_local_disk
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}
作者:
chenl
时间:
2011-11-14 13:34
监控远程主机(linux/unix)一般通过check by ssh或者check_nrpe进行,看看相关文档吧。
你的配置有误。
作者:
asacml
时间:
2011-11-14 14:18
我的是freebsd版本
作者:
zhongchy
时间:
2011-11-14 15:48
check_command check_local_disk!20%!10%!/usr
改成 check_command nrpe!check_usr
作者:
mrs99098
时间:
2011-11-18 12:30
监控机上对objects下监控对象里的服务定义里check_command应该是check_nrpe!remote_ip!check_usr
更详细的在libexec下执行./check_nrpe --help查看帮助,然后再commands.cfg里要定义check_nrpe的命令。
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2