nagios实现对个别用户隐藏部分服务信息

nagios如何实现对个别用户隐藏部分服务信息。 

1、添加测试用户

  1. htpasswd /usr/local/nagios/etc/htpasswd.users user 

2、将测试用户添加到联系人。

  1. define contact{  
  2.          contact_name    test  
  3.          use             generic-contact  
  4.          alias           test  
  5.          }  

3、将联系人添加到允许查看的个别服务中(define service)。注意不能写入define host,写入host里面就能看见该主机的全部服务了。

  1. define service { 
  2.         use                   web 
  3.         host_name             web-test 
  4.         service_description    80_Port_Status 
  5.         normal_check_interval   1 
  6.         notifications_enabled   0 
  7.         check_command           check_tcp!80 
  8. contacts test
  9.         } 

 这样就能想让test用户看什么服务,就只能看什么服务。