web interface see specific services

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

web interface see specific services

Post 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.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: web interface see specific services

Post 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.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: web interface see specific services

Post by vvz »

thank you
Clear enough
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: web interface see specific services

Post by hsmith »

vvz wrote:thank you
Clear enough
Are we all right to mark this one as resolved?
Former Nagios Employee.
me.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: web interface see specific services

Post by vvz »

yes, absolutely
thank you
Locked