Different user to view different host groups

Marc Powell mpowell at ena.com
Mon Nov 10 18:39:07 CET 2003



> -----Original Message-----
> From: Pietro Bandera [mailto:pietrob at lansystems.it]
> Sent: Monday, November 10, 2003 10:58 AM
> To: nagios-users at lists.sourceforge.net
> 
> 
> Hi all
> 
> I'm trying to do this:
> 
> I would like to run nagios in order to do checks but, i would like to
> make a selection of which host and services a webusers can see
> 
> For example:
> 
> On a nagios i got 3 hosts and each of them has 5 checks.
> 
> The webuser1 can see everything
> 
> The webuser2 can see everithing but only about host 1 and 2 and all
> their checks
> 
> The webuser3 can see everything but only about host 3 and its checks
> 
> 
> I think this is not possbile with the nagios 1.1 (or not?) becasue
> webuser selection can be done only on the CGI to see or not, not on
the
> hosts or services to see.
> 
> So i thought to start multiple nagios process, each with a different
> name...and each with different host to check, config...etc...

It's not necessary. The behavior you want is already built in. By
default, if you have authentication properly enabled and configured,
users can only see or modify those hosts and services for which they are
authorized contacts. For your scenario, you would have 2 contact
definitions, one for webuser2 and one for webuser3. Then you would have
2 contact_groups :

Group1 contains webuser2.
Group2 contains webuser3.

Define a hostgroup containing host1 and host2 with Group1 as the
contact_group.
Define a hostgroup containing host3 with Group2 as the contact_group.

Set Group1 as the contact_group for all services on host1 and host2.
Set Group2 as the contact_group for all services on host3.
(Note the above 2 steps may be redundant and unnecessary. I can't
remember if being a host contact automatically infers being a service
contact for that host and I don't have quick access to the
documentation.)

To take care of webuser1, since they're authorized to see everything,
you could either add them to every contact_group definition or add them
to the authorized_for_* config options in cgi.cfg.

I believe that covers the basic steps in a nutshell.

--
Marc


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list