Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1792261
  • 博文数量: 293
  • 博客积分: 10127
  • 博客等级: 上将
  • 技术积分: 3029
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-12 19:05
文章分类

全部博文(293)

文章存档

2011年(11)

2010年(282)

我的朋友

分类: LINUX

2010-09-07 09:41:00

某一台服务器需要监控4000端口
修改 /usr/local/nagios/etc/objects/commands.cfg  添加一个服务名
 
 
# check port 4000
define command{
        command_name    4000
        command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p 4000 $ARG2$
        }
 
然后修改linux的模板
 
vim  /usr/local/nagios/etc/objects/web1.cfg   添加一段
 
# Define a service to check HTTP on the local machine.
# Disable notifications for this service by default, as not all users may have HTTP enabled.
define service{
        use                             local-service         ; Name of service template to use
        host_name                     web1
        service_description            4000
        check_command                  4000
                is_volatile                     0
        check_period                    24x7
        max_check_attempts              2
        normal_check_interval           1
        retry_check_interval            1
        contact_groups                  admins
        notification_options            w,u,c,r
        notification_interval           960
        notification_period             24x7
        }

 

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

chinaunix网友2010-09-09 16:11:26

Download More than 1000 free IT eBooks: http://free-ebooks.appspot.com