Page 1 of 1

web interface see specific services

Posted: Tue Aug 25, 2015 3:02 pm
by vvz
Hi!
I need some user only able to see specific host and only specific services on this host.

I've created someuser contact and added to cgi.bin :
authorized_for_all_services=nagiosadmin, someuser
authorized_for_all_hosts=nagiosadmin, someuser
added someuser to host definition, restarted apache and nagios. Logined as someuser.
Yes, Only host which has someuser contact is shown on web-interface, no command can be issued by someuser from, everything as I expected.

Now, I remove someuser from authorized_for_all_services line (restarted apache and nagios) and I was expecting that on web interface should be no services displayed, only host info.

But services still are shown on web-interface.

What else shoud I do? I really need to show only a few services for the user (it is third-party company user). Is it possible?

Thank you.

Re: web interface see specific services

Posted: Tue Aug 25, 2015 3:49 pm
by jdalrymple
authorized_for_all_services and authorized_for_all_hosts do exactly what they sound like, grant access to all hosts and services.

What you want is for that user to NOT be in either of those cgi.cfg configuration lines but instead just have their contact defined in the specific hosts and services for which you want them to be visible:
CGI Configuration File Options wrote:Global Host Information Access

Format: authorized_for_all_hosts=<user1>,<user2>,<user3>,...<usern>
Example: authorized_for_all_hosts=nagiosadmin,theboss

This is a comma-delimited list of names of authenticated users who can view status and configuration information for all hosts. Users in this list are also automatically authorized to view information for all services. Users in this list are not automatically authorized to issue commands for all hosts or services. If you want users able to issue commands for all hosts and services as well, you must add them to the authorized_for_all_host_commands variable. More information on how to setup authentication and configure authorization for the CGIs can be found here.
CGI Configuration File Options wrote:Global Service Information Access

Format: authorized_for_all_services=<user1>,<user2>,<user3>,...<usern>
Example: authorized_for_all_services=nagiosadmin,theboss

This is a comma-delimited list of names of authenticated users who can view status and configuration information for all services. Users in this list are not automatically authorized to view information for all hosts. Users in this list are not automatically authorized to issue commands for all services. If you want users able to issue commands for all services as well, you must add them to the authorized_for_all_service_commands variable. More information on how to setup authentication and configure authorization for the CGIs can be found here.

Re: web interface see specific services

Posted: Tue Aug 25, 2015 3:51 pm
by vvz
thank you
Clear enough

Re: web interface see specific services

Posted: Tue Aug 25, 2015 3:54 pm
by hsmith
vvz wrote:thank you
Clear enough
Are we all right to mark this one as resolved?

Re: web interface see specific services

Posted: Tue Aug 25, 2015 4:21 pm
by vvz
yes, absolutely
thank you