nagios 多用户权限管理---特定用户访问特定主机或服务 1.nagios安装 ------------ 2.添加用户和密码 htpasswd /usr/local/nagios/etc/htpasswd.users eddy
3.修改配置 vim /usr/local/nagios/etc/cgi.cfg use_authentication=1 authorized_for_read_only=eddy
4.添加联系人 vi /usr/local/nagios/etc/objects/contacts.cfg efine contact{ contact_name eddy use generic-contact alias eddy } 5.添加联系组 define contactgroup{ contactgroup_name eddy alias eddy members eddy } 6.为主机或者服务添加联系组 在属于eddy的主机、服务配置文件的联系人中加入eddy: define host{ use linux-server host_name gfs5 alias gfs5 address 192.168.6.196 contact_groups eddy } 在主机中添加此联系组,那就可以查看此主机所有服务 define service{ use local-service ; Name of service template to use host_name gfs5 service_description PING check_command check_ping!100.0,20%!500.0,60% contact_groups eddy } 在服务中添加此联系组,那就只能查看此服务器,此主机其它服务均不能查看