multiple instances

Marc Powell marc at ena.com
Fri Oct 8 00:17:18 CEST 2004


Mr Candian,

I am sure that I speak for many on this list when I say to please stop
what you are doing. Stop trying to configure Nagios in the way that you
are as it will not work as you expect. Please re-read the documentation,
please re-read what I and others have told you is the correct way to
allow multiple logins to see different hosts and services from each
other. It's exceedingly simple; don't overcomplicate it. Please re-read
what Tim said in the very email you responded to which was clearly
directing you to do something other than what you did. Then read the
documentation again, specifically the parts about contacts,
contact_groups, and CGI Authentication. I suggest that you might want to
start from the very beginning again. You need one installation of
Nagios. That's it. That one installation of Nagios can serve as the
front end for tens, hundreds or thousands of companies and they would
have no idea the others existed.

If, after all of the above, you still do not understand, you may want to
contact a Linux User Group in your area. Chances are someone there has
experience with Nagios that can sit down with you and show you hands on
what you need to do. There are also commercial entities that will help
you set up Nagios as well. I only mention these options because your
repeated queries on this subject show that you do not yet understand the
basic operation of Nagios and do not appear to understand the advice
that has been provided to you.

--
Marc

----Original Message----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Mario
Sergio
Candian Sent: Thursday, October 07, 2004 3:54 PM To: Tim Palmer
Cc: Nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] multiple instances

> Hi Tim,
> 
> i do what u tell me. I copied the nagios.cfg and cgi.cfg for the
directory of
> the companyA, and companyB. Then, I edited the files, and I put the
following
> form:  
> 
> In /companyA/etc/cgi.cfg:
> 
>
main_config_file=/usr/home/eksffa/public_html/nagios/companyA/etc/nagios
.cfg
> 
> physical_html_path=/usr/home/eksffa/public_html/nagios/share
> 
> url_html_path=/companyA
> 
> authorized_for_configuration_information=companyA
> ...
> 
> In /companyA/etc/nagios.cfg
> 
> log_file=/usr/home/eksffa/public_html/nagios/companyA/var/nagios.log
> 
> ...
> 
> cfg_file=/usr/home/eksffa/public_html/nagios/etc/contactgroups.cfg
> cfg_file=/usr/home/eksffa/public_html/nagios/etc/contacts.cfg
> cfg_file=/usr/home/eksffa/public_html/nagios/etc/dependencies.cfg
> ...
> 
>
status_file=/usr/home/eksffa/public_html/nagios/companyA/var/status.log
> 
> nagios_user=nagios
> 
> ...
> 
> the same for the companyB (cgi.cfg and nagios.cfg) modifying only the
names.
> 
> My cgi.cfg and nagios.cfg default is:
> 
> cgi.cfg:
> 
> main_config_file=/usr/home/eksffa/public_html/nagios/etc/nagios.cfg
> 
> physical_html_path=/usr/home/eksffa/public_html/nagios/share
> 
> url_html_path=/nagios
> 
> use_authentication=1
> 
> authorized_for_system_information=admin
> ...
> 
> And my nagios.cfg is:
> 
> log_file=/usr/home/eksffa/public_html/nagios/var/nagios.log
> 
> cfg_file=/usr/home/eksffa/public_html/nagios/etc/contactgroups.cfg
> cfg_file=/usr/home/eksffa/public_html/nagios/etc/contacts.cfg
> cfg_file=/usr/home/eksffa/public_html/nagios/etc/dependencies.cfg
> 
> ...
> 
> comment_file=/usr/home/eksffa/public_html/nagios/var/comment.log
> 
> ...
> 
> In my httpd.conf:
> 
>    ScriptAlias /nagios/cgi-bin/
/usr/home/eksffa/public_html/nagios/sbin/
>   <Directory "/usr/home/eksffa/public_html/nagios/sbin/">
>      AllowOverride AuthConfig
>      Options ExecCGI
>      Order allow,deny
>      Allow from all
>   </Directory>
> 
>     ScriptAlias /companyA/cgi-bin/
/usr/home/eksffa/public_html/nagios/sbin/
>    <Directory "/usr/home/eksffa/public_html/nagios/sbin/">
>       AllowOverride AuthConfig
>       Options ExecCGI
>       Order allow,deny
>       Allow from all
>       require user mdbrasil
>    </Directory>
> 
>     ScriptAlias /companyB/cgi-bin/
/usr/home/eksffa/public_html/nagios/sbin/
>    <Directory "/usr/home/eksffa/public_html/nagios/sbin/">
>       AllowOverride AuthConfig
>       Options ExecCGI
>       Order allow,deny
>       Allow from all
>       require user twi
>    </Directory>
> 
>   <Directory "/usr/home/eksffa/public_html/nagios/share/">
>      Options None
>      AllowOverride AuthConfig
>      Order allow,deny
>      Allow from all
>   </Directory>
> 
>    Alias /companyA/ /usr/home/eksffa/public_html/nagios/share/
>   <Directory "/usr/home/eksffa/public_html/nagios/share/">
>      Options None
>      AllowOverride AuthConfig
>      Order allow,deny
>      Allow from all
>      require user mdbrasil
>   </Directory>
> 
>    Alias /companyB/ /usr/home/eksffa/public_html/nagios/share/
>   <Directory "/usr/home/eksffa/public_html/nagios/share/">
>      Options None
>      AllowOverride AuthConfig
>      Order allow,deny
>      Allow from all
>      require user twi
>   </Directory>
> 
> Do I need to run the nagios.cfg of the companyA and companyB
directory?
> e.g:
> ./nagios -d
/usr/home/eksffa/public_html/nagios/companyA/etc/nagios.cfg
> and
> ./nagios -d
/usr/home/eksffa/public_html/nagios/companyB/etc/nagios.cfg
> 
> or, only nagios.cfg of the /usr/home/eksffa/public_html/nagios/etc
> directory?
> 
> Thanks!
> 
> Mario Sergio
> 
> On Tue, 5 Oct 2004, Tim Palmer wrote:
> 
> > No, you are making this far more complicated than it needs to be.
> > 
> > One nagios.cfg, one cgi.cfg, one webspace, one ScriptAlias, one
Alias.
> > You don't need all this extra stuff.
> > 
> > When a user logs into apache, the account that they use to login
will
> > be matched to a contact in your contacts.cfg. What that person will
> > see is determined by which hosts/hostgroups/services use the
> > contactgroup that this contact is a member of.
> > 
> > In general, don't put any contacts besides maybe a "superuser" in
the
> > cgi.cfg "authorized_for_..." lines.
> > 
> > Read - very carefully, as many times as necessary - the section in
the
> > docs called "Configuring Authentication for the CGIs". Make sure you
> > understand the "definitions" section near the top.
> > 
> > tim
> > 
> > At 01:59 PM 10/5/2004, Mario Sergio Candian wrote:
> > 
> > > Oks guys,
> > > 
> > > i will edit the cgi.cfg, and i will need to define some attributes
as
> > > like: 
> > > 
> > >
main_config_file=/usr/home/eksffa/public_html/nagios/etc/nagios.cfg
> > >
main_config_file=/usr/home/eksffa/public_html/nagios/companyA/etc/nag
> > > ios.cfg
> > >
main_config_file=/usr/home/eksffa/public_html/nagios/companyB/etc/nag
> > > ios.cfg  
> > > 
> > > url_html_path=/nagios
> > > url_html_path=/companyA
> > > url_html_path=/companyB
> > > 
> > > authorized_for_system_information=admin,userA,userB
> > > 
> > > will i need to copy the etc (with the .cfg files) for other
directory
> > > (/companyA/etc) and (/companyB/etc)? Or will i can edit the .cfg
files in
> > > the /nagios/etc? 
> > > 
> > > then, i will define the hosts, hostgroups, services, and i need to
create
> > > the aliases scripts: 
> > > 
> > >     ScriptAlias /companyA/cgi-bin/
> > > /usr/home/eksffa/public_html/nagios/companyA/sbin/
> > >    <Directory "/usr/home/eksffa/public_html/nagios/sbin/">
> > >       AllowOverride AuthConfig
> > >       Options ExecCGI
> > >       Order allow,deny
> > >       Allow from all
> > >    </Directory>
> > > 
> > >     ScriptAlias /companyB/cgi-bin/
> > > /usr/home/eksffa/public_html/nagios/CompanyB/sbin/
> > >    <Directory "/usr/home/eksffa/public_html/nagios/sbin/">
> > >       AllowOverride AuthConfig
> > >       Options ExecCGI
> > >       Order allow,deny
> > >       Allow from all
> > >    </Directory>
> > > 
> > >    Alias /companyA/ /usr/home/eksffa/public_html/nagios/share/
> > >   <Directory "/usr/home/eksffa/public_html/nagios/share/">
Options
> > >      None AllowOverride AuthConfig
> > >      Order allow,deny
> > >      Allow from all
> > >   </Directory>
> > > 
> > >    Alias /companyB/ /usr/home/eksffa/public_html/nagios/share/
> > >   <Directory "/usr/home/eksffa/public_html/nagios/share/">
Options
> > >      None AllowOverride AuthConfig
> > >      Order allow,deny
> > >      Allow from all
> > >   </Directory>
> > > 
> > > Is this correcty?
> > > 
> > > Mario Sergio



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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