Page 1 of 1

Hide hosts from user in status cgi

Posted: Thu Nov 08, 2012 3:44 pm
by m_verafin
Using latest Nagios core on Ubuntu 12.04 (precise)

I have created a user in htpasswd.users. I think set this user up to be a contact for 2 hosts. The first host is the only host in host group A. The second host is one of many hosts in host group B. When I log into the Nagios core website as this new user, and I go to Host Groups page, I expected to see both host group A and B, with one host showing in each group. The Nagios core documentation states that for status.cgi "If you are an authenticated contact you can view all hosts and services for which you are a contact.". However I only see host group A. I'm guessing that is because all the hosts in host group A (there is only one) have that user set as a contact. How can I configure Nagios so that this user sees his 2 hosts?

I could create a new host group based on B that contains just the one host for the user. But then the admin user who has permission to view all hostgroups will have to see all these 'work around' host groups.

Re: Hide hosts from user in status cgi

Posted: Thu Nov 08, 2012 4:19 pm
by jsmurphy
The user can see both hosts, he just can't see both hostgroups if that makes sense. So if you log in as that user and type the group B device in quick search it should appear.

A user can only see a hostgroup if that user has visibility of all hosts in that group. Hopefully this helps.

Re: Hide hosts from user in status cgi

Posted: Fri Nov 09, 2012 7:00 am
by m_verafin
So it is an all or nothing situation? The user can either be a contact for all hosts in a host group to see that host group in the status cgi, otherwise he sees none of the hosts from that hostgroup? I would have thought there would be a configuration option to just display the hosts in a hostgroup that a user is allowed to see. I guess I'll have to make new hostgroups for each user I create so that they can see their hostgroups properly. Other than this though, I find Nagios core is able to handle our needs very well.

Re: Hide hosts from user in status cgi

Posted: Mon Nov 12, 2012 4:27 pm
by jsmurphy
Yes it's an all or nothing situation from a hostgroup point of view... although this bit:
...otherwise he sees none of the hosts from that hostgroup?
Isn't explicitly true... they can still see all of the the hosts individually... just not as a hostrgroup.