Chinaunix首页 | 论坛 | 博客
  • 博客访问: 288210
  • 博文数量: 65
  • 博客积分: 1514
  • 博客等级: 中尉
  • 技术积分: 820
  • 用 户 组: 普通用户
  • 注册时间: 2011-10-20 21:01
文章分类

全部博文(65)

文章存档

2012年(65)

分类: LINUX

2012-02-22 17:10:39

看了objects里的文件半天,理解了半天,有些许悟.但本人对英文说明文档不敏感,如有错误希望高手指出.
 
nagios/etc/nagios.cfg是主配置文件,部分内容如下
  1. # You can specify individual object config files as shown below:
  2. cfg_file=/usr/local/nagios/etc/objects/commands.cfg
  3. cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
  4. cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
  5. cfg_file=/usr/local/nagios/etc/objects/templates.cfg
  6. cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
  7. cfg_file=/usr/local/nagios/etc/objects/mylinux.cfg
  8. #cfg_file=/usr/local/nagios/etc/objects/windows.cfg
  9. cfg_file=/usr/local/nagios/etc/objects/switch.cfg
  10. #cfg_file=/usr/local/nagios/etc/objects/printer.cfg
  11. # You can also tell Nagios to process all config files (with a .cfg
  12. # extension) in a particular directory by using the cfg_dir
  13. # directive as shown below:
  14. #cfg_dir=/usr/local/nagios/etc/servers
  15. #cfg_dir=/usr/local/nagios/etc/printers
  16. #cfg_dir=/usr/local/nagios/etc/switches
  17. #cfg_dir=/usr/local/nagios/etc/routers

可以看出,引用cfg文件无特别前后顺序.

各cfg文件定义了主体,包括主机名,联系人,服务,命令,时间等

再根据不同的监控对象引用主体,实现监控手段.

画了个简陋的关系图,对理解有帮助.

 

阅读(2281) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~