nagios如何實現對個別用戶隱藏部分服務信息。
1、添加測試用戶
- htpasswd /usr/local/nagios/etc/htpasswd.users user
2、將測試用戶添加到聯繫人。
- define contact{
- contact_name test
- use generic-contact
- alias test
- }
3、將聯繫人添加到允許查看的個別服務中(define service)。注意不能寫入define host,寫入host裏面就能看見該主機的全部服務了。
- define service {
- use web
- host_name web-test
- service_description 80_Port_Status
- normal_check_interval 1
- notifications_enabled 0
- check_command check_tcp!80
- contacts test
- }
這樣就能想讓test用戶看什麼服務,就只能看什麼服務。