来源:自学PHP网 时间:2015-04-14 11:12 作者: 阅读:次
[导读] icinga添加http service紧接上文http://www.2cto.com/os/201305/211092.html,现在监控了10.112.18.131 host,但是没有任何public service被监控。该机上已经安装了nginx,监听80端口,提供了静态文件服务器。...
icinga添加http service
紧接上文http://www.2cto.com/os/201305/211092.html,现在监控了10.112.18.131 host,但是没有任何public service被监控。该机上已经安装了nginx,监听80端口,提供了静态文件服务器。
第一步:确保nginx提供了根目录的访问
[plain]
location / {
root /opt;
index index.html;
}
手动通过浏览器测试一下:http://10.112.18.131
可以看到index.html的内容就行了。
第二步:在/usr/local/icinga/etc/object/linux.cfg文件中添加一个service
[plain]
File Edit Options Buffers Tools Minibuf Help
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 for 3D and jenksins server for CloudEngine ; 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
}
# check that web services are running
define service {
host_name StaticFileServer
service_description HTTP
check_command check_http
use generic-service
action_url http://10.112.18.131/ArcGIS/rest/services/SanFrancisco/3DFeatureServer
notification_interval 0 ; set > 0 if you want to be renotified
}
好。测试一下:
[plain]
/usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
然后重新加载:
[plain]
service icinga reload
现在刷新网页:
一切OK. 点击HTTP右边的齿轮按钮,可以打开action_url的链接地址。
|
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com