码迷,mamicode.com
首页 > 移动开发 > 详细

nagios(或icinga)将多个主机放到一个组内步骤

时间:2014-08-08 18:27:07      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:hostgroup   nagios   


nagios将多个主机放到一个组内步骤:


# vi ming.cfg   


define host{
       use           linux-server
       host_name     ming
       alias         ming
       address       192.168.1.14
       action_url    /pnp4nagios/index.php/graph?host=$HOSTNAME$
       }


define host{
       use           linux-server
       host_name     ming2
       alias         ming2
       address       192.168.1.15
       action_url    /pnp4nagios/index.php/graph?host=$HOSTNAME$
       }
 

define  hostgroup{
       hostgroup_name  ubuntu
       alias           ubuntu
       members         ming,ming2    (主机间用","隔开)
       }

 

将hostgroup_name改为ming,members也改为ming


define service {
 
               use                generic-service
               host_name           ming,ming2
               service_description  check_load
               check_command        check_nrpe!check_load
}


define service {
 
               use                generic-service
               host_name           ming,ming2
               service_description  check_users
               check_command        check_nrpe!check_users
}

define service {
 
               use                generic-service
               host_name           ming,ming2
               service_description  check_total
               check_command        check_nrpe!check_total_procs
}


define service {
 
               use                generic-service
               host_name           ming,ming2
               service_description  check_hda1
               check_command        check_nrpe!check_hda1
}

 

:wq

本文出自 “linux” 博客,谢绝转载!

nagios(或icinga)将多个主机放到一个组内步骤,布布扣,bubuko.com

nagios(或icinga)将多个主机放到一个组内步骤

标签:hostgroup   nagios   

原文地址:http://yangzhiming.blog.51cto.com/4849999/1537522

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!