当前位置 主页 > 服务器问题 > Linux/apache问题 >
define hostgroup { hostgroup_name sa-servers alias sa servers members nagios-server,24-25,24-26 //用逗号间隔多个主机 } |
千辛万苦,终于把这些配置给做好保存,现在几乎有点迫不及待了,运行程序/usr/local/nagios –v /usr/local/nagios/etc/nagios.cfg来检查所有配置文件的正确性。如果十分幸运的话,运行完毕将在输出尾部出现:
Total Warnings: 0 Total Errors: 0 Things look okay - No serious problems were detected during the pre-flight check |
[root@netmonitor nagios]# bin/nagios -v etc/nagios.cfg Nagios 2.5 Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org) Last Modified: 07-13-2006 License: GPL Reading configuration data... Error: Could not find any host matching 'nagios-server' Error: Could not expand member hosts specified in hostgroup |