我们安装了 Nagios Core 3.2.1,我当前的任务是允许非管理员用户访问 Nagios UI。这可能吗?还是我需要安装一些插件?
答案1
是否可以创建“只读”用户?
当然,你可以使用authorized_for_read_only
多变的:
/usr/local/nagios/etc/cgi.cfg
# A comma-delimited list of usernames that have read-only rights in
# the CGIs. This will block any service or host commands normally shown
# on the extinfo CGI pages. It will also block comments from being shown
# to read-only users.
authorized_for_read_only=anonymous
并让他们只查看特定的服务/服务器?
创建一个接触定义相同contact_name
:
/usr/local/nagios/etc/objects/contacts.cfg
define contact{
contact_name anonymous
use generic-contact
alias No Name
service_notifications_enabled 1
host_notifications_enabled 1
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c,w,r
host_notification_options d,u,r
email [email protected]
}
(这叫做已验证的联系人)
然后让他成为您想要允许查看的主机/服务的联系人:
define host{
use linux-server
host_name localhost
address 127.0.0.1
contacts anonymous
contact_groups admin
}
答案2
是的,只需创建一个没有任何特殊权限的用户。
答案3
好吧,我也尝试过更改authorized_for_read_only
属性。但是为了查看服务和主机,还需要进行以下配置更改。之后重新启动 Apache 服务器。
authorized_for_all_services=nagiosadmin,--your user--
authorized_for_all_hosts=nagiosadmin,--your user--