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用戶看什麼服務,就只能看什麼服務。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章