上海isp 发表于 2019-1-15 13:33:42

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

  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用户看什么服务,就只能看什么服务。



页: [1]
查看完整版本: nagios实现对个别用户隐藏部分服务信息