Hostgroup Question

Marc Powell marc at ena.com
Tue Jan 11 21:56:49 CET 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Emmett Hogan
> Sent: Tuesday, January 11, 2005 2:29 PM
> To: Nagios Users List
> Subject: [Nagios-users] Hostgroup Question
> 
> (Y'all are probably getting sick and tired of me.) :-(
> 
> Is there any way to *NOT* have a hostgroup displayed on the Hostgroup
> Web pages?
> 
> For example....I group the hosts by the function, i.e. production,
q/a,
> development...and I want them to display in those groups on the
> Hostgroup Overview and Summary pages.  However, I also group them by
OS
> (i.e. solaris, linux, windows)...so that I can have a set of service
> definitions which relate to a specific OS hostgroup.  When I get a new
> solaris box, I just add it to the solaris hostgroup and magically I
have
> a group of services being tested.  However, I don't want the big long
> list of OS hostgroups displayed on the hostgroups page.
> 
> Does this make sense?  Is it possible? (And yes....I have read the
docs).


Yes, it is. The key is that with CGI authentication enabled, logged in
users only see hosts and services that they are authorized contacts for.

Configure CGI authentication as detailed at
http://nagios.sourceforge.net/docs/1_0/cgiauth.html. I believe that
there are no significant changes between 1.x and 2.0 in this regard but
you should review the docs for the version you are running. I'll presume
that you're still running 1.x. 

Once you've done that, create two new .htaccess users; one that you
would log in as to see your hosts grouped by function and then an
[optional] second user that you would log in as to see the hosts grouped
by OS. I'll call these two users 'functionuser' and 'osuser' for
example. 

Add new contact definitions for each of these users and set their
host_notification_period and service_notification_period to none because
they don't need to receive notifications. 

If you already have different contact_groups created for each of your
two hostgroup types above then all you need to do is add functionuser to
the contact_group for the Functional hostgroups and osuser to the
contact_group for the OS based hostgroups. 

If you do not already have two different contact_groups for each
hostgroup type then you'll need to create those and either replace your
current contact_groups entry in the hostgroup definition or add the new
one as a secondary if you create new contact_groups that only contain

After that's done you'll simply go to the web interface, log in as
'functionuser' with the appropriate password and you should only see
those hostgroups that 'functionuser' is associated with via the
contact_group.

--
Marc



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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