icinga 1.9添加host


icinga 1.9添加host
 
通过编译的方式在UBuntu12.10 server上成功安装了Icinga1.9, 这里选用的是Apache2,Nginx暂时还没搞定。
打开网页后,发现只能看到监控localhost,所以需要监控其他host。没有web UI可以完成这个功能。需要到icinga server上操作。
第一步:创建/usr/local/icinga/etc/objects/linux.cfg文件
内容如下:
[plain] 
define host{  
        use             linux-server            ; Inherit default values from a template  
        host_name       StaticFileServer              ; The name we're giving to this host                                                                                         
        alias           static filer server         ; A longer name associated with the host                                             
        address         10.112.18.131            ; IP address of the host                                                                                                          
        contact_groups  admins                ; Host groups this host is associated with                                                                                           
        }  
 
注意这里的contact_groups的值admins是在文件/usr/local/icinga/etc/objects/contacts.cfg文件中找到的。
第二步:在/usr/local/icinga/etc/icinga.cfg文件中添加一行
[plain] 
cfg_file=/usr/local/icinga/etc/objects/linux.cfg  
 
第三步,运行命令检测配置:
[html] 
/usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg  
 
第四步,重新读取配置文件:
[plain] 
service icinga reload  
 
好,现在到网页上查看一下:
 
 
有了。

相关内容

    暂无相关文章