getting nagios to start

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
[email protected]
Posts: 2
Joined: Fri Nov 23, 2012 3:41 pm

getting nagios to start

Post by [email protected] »

Greetings,

Just insalled nagios 3.3.1 on openbsd 5.2. The web server apache is up and running and I can get the initial page.
Nagios installed to /etc/nagios/ In this directory, I can see the nagios.cfg main configuratin file.
I can start nagios from /usr/local/sbin/nagios start. When I execute the top command I see nagios running.
What other configuration I need to work on to get nagios to show on the web site:
Please, let me know! Thanks!
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: getting nagios to start

Post by mguthrie »

Do you have an alias setup with apache to point to the Nagios web directory? Example for a RHEL-based system on a source install:

Apache config:
/etc/httpd/conf.d/nagios.conf

Directs all requests to http://<myserver>/nagios to:

/usr/local/nagios/share


Example nagios.conf for this setup:

Code: Select all

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
   AuthName "Nagios Core"
   AuthType Basic
   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
   Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
   AuthName "Nagios Core"
   AuthType Basic
   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
   Require valid-user
</Directory>
[email protected]
Posts: 2
Joined: Fri Nov 23, 2012 3:41 pm

Re: getting nagios to start

Post by [email protected] »

Greetings,

Many thanks for your response: here is what I have in httpd.conf

#
Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
#Scriptalias/nagios /var/www/nagios
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

#
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Format: Redirect old-URI new-URL
#
But to be honest with you I am not sure if that is the correct path that I should point to; how do I know that?
Here is more information about the directory structure:
main configuration files: /etc/nagios/nagios.cfg
Let me know! Thanks
Locked