My configurations are as follows,I can access the test page

Hello…

my detail configurations are as follows,I can access the test page for apache,but cannot invoke the nagios!
please help me.

1, creating a directory storing compressed packages with suffix of .tar.gz and bz2(including nagios-2.0b3.tar, nagios-plugins-1.4.tar, gd-2.0.15.tar, httpd-2.0.54.tar.bz2)
[root@localhost local]# mkdir nagiosfolder
2, I have copied the four packages into nagiosfolder
[root@localhost nagiosfolder]# ls
gd-2.0.33.tar.gz nagios-2.0b3.tar.gz
httpd-2.0.54.tar.bz2 nagios-plugins-1.4.tar.gz
3, unpacking gd-2.0.33.tar,gz
[root@localhost nagiosfolder]# tar xzf gd-2.0.33.tar.gz
[root@localhost nagiosfolder]# ls
gd-2.0.33 httpd-2.0.54.tar.bz2 nagios-plugins-1.4.tar.gz
gd-2.0.33.tar.gz nagios-2.0b3.tar.gz
4,installing gd-2.0.33
[root@localhost nagiosfolder]# cd gd-2.0.33
[root@localhost gd-2.0.33]# ./configure
[root@localhost gd-2.0.33]# make
[root@localhost gd-2.0.33]# make install
5, unpacking nagios-2.0b3.tar.gz
[root@localhost gd-2.0.33]# cd …
[root@localhost nagiosfolder]#
[root@localhost nagiosfolder]# tar xzf nagios-2.0b3.tar.gz
[root@localhost nagiosfolder]# ls
gd-2.0.33 httpd-2.0.54.tar.bz2 nagios-2.0b3.tar.gz
gd-2.0.33.tar.gz nagios-2.0b3 nagios-plugins-1.4.tar.gz

6, creat nagios user/group
[root@localhost nagiosfolder]# adduser nagios

7, Creat install directory
[root@localhost /]# mkdir /usr/local/nagios

8, Change the owner of the base installtion directory to be the Nagios user and group you added earlier as follows:
[root@localhost /]# chown nagios.nagios /usr/local/nagios

9,Add group
[root@localhost /]# /usr/sbin/groupadd nagcmd

[root@localhost /]# /usr/sbin/groupadd nagcmd
[root@localhost /]# /usr/sbin/usermod -G nagcmd apache

10,Install apache

[root@localhost nagiosfolder]# ls
gd-2.0.33 httpd-2.0.54.tar.bz2 nagios-2.0b3.tar.gz
gd-2.0.33.tar.gz nagios-2.0b3 nagios-plugins-1.4.tar.gz

11, unpacking httpd-2.0.54.tar.bz2
[root@localhost nagiosfolder]# bunzip2 httpd-2.0.54.tar.bz2
[root@localhost nagiosfolder]# tar xf httpd-2.0.54.tar
[root@localhost nagiosfolder]# ls
gd-2.0.33 httpd-2.0.54.tar nagios-plugins-1.4.tar.gz
gd-2.0.33.tar.gz nagios-2.0b3
httpd-2.0.54 nagios-2.0b3.tar.gz

[root@localhost nagiosfolder]# cd httpd-2.0.54

[root@localhost httpd-2.0.54]# ./configure
[root@localhost httpd-2.0.54]# make
[root@localhost httpd-2.0.54]# make install

12, install nagios

 [root@localhost nagiosfolder]# ls

gd-2.0.33 httpd-2.0.54.tar nagios-plugins-1.4.tar.gz
gd-2.0.33.tar.gz nagios-2.0b3
httpd-2.0.54 nagios-2.0b3.tar.gz

[root@localhost nagiosfolder]# cd nagios-2.0b3

 Run the configure script
 
 [root@localhost nagios-2.0b3]# ./configure --prefix=/usr/local/nagios --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios/ --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagios

 Compile Nagios and the CGIs

[root@localhost nagios-2.0b3]# make all

Install the binaries and HTML files

[root@localhost nagios-2.0b3]# make install

 Installing an Init Script

 [root@localhost nagios-2.0b3]# make install-init
 [root@localhost nagios-2.0b3]# make install-commandmode
  [root@localhost nagios-2.0b3]# make install-config

Change to nagios directory
[root@localhost nagios]# dir
bin etc sbin share var
13, installing the plugins

  [root@localhost nagiosfolder]# ls

gd-2.0.33 httpd-2.0.54.tar nagios-plugins-1.4.tar.gz
gd-2.0.33.tar.gz nagios-2.0b3
httpd-2.0.54 nagios-2.0b3.tar.gz

[root@localhost nagiosfolder]# tar xzf nagios-plugins-1.4.tar.gz

  [root@localhost nagiosfolder]# ls

gd-2.0.33 httpd-2.0.54.tar nagios-plugins-1.4
gd-2.0.33.tar.gz nagios-2.0b3 nagios-plugins-1.4.tar
httpd-2.0.54 nagios-2.0b3.tar.gz
[root@localhost nagiosfolder]# cd nagios-plugins-1.4
[root@localhost nagios-plugins-1.4]# ./configure
[root@localhost nagios-plugins-1.4]# make
[root@localhost nagios-plugins-1.4]# make install

14, rename the *.cfg-sample to *cfg

  [root@localhost nagios]# ls

bin etc libexec sbin share var
[root@localhost nagios]# cd etc
[root@localhost etc]# ls
bigger.cfg-sample minimal.cfg-sample resource.cfg-sample
cgi.cfg-sample misccommands.cfg-sample
checkcommands.cfg-sample nagios.cfg-sample

[root@localhost etc]# mkdir sample
[root@localhost etc]# cp *.cfg-sample sample/
[root@localhost etc]# ls
bigger.cfg-sample minimal.cfg-sample resource.cfg-sample
cgi.cfg-sample misccommands.cfg-sample sample
checkcommands.cfg-sample nagios.cfg-sample

[root@localhost etc]# mv bigger.cfg-sample bigger.cfg
[root@localhost etc]# mv cgi.cfg-sample cgi.cfg
[root@localhost etc]# mv checkcommands.cfg-sample checkcommands.cfg
[root@localhost etc]# mv minimal.cfg-sample minimal.cfg
[root@localhost etc]# mv misccommands.cfg-sample misccommands.cfg
[root@localhost etc]# mv nagios.cfg-sample nagios.cfg
[root@localhost etc]# mv resource.cfg-sample resource.cfg
[root@localhost etc]# ls
bigger.cfg checkcommands.cfg misccommands.cfg resource.cfg
cgi.cfg minimal.cfg nagios.cfg sample

15, setting up the web interface

 [root@localhost local]# cd apache2/

[root@localhost apache2]# cd bin
[root@localhost bin]# apachectl start

[root@localhost apache2]# cd conf
[root@localhost conf]# ls
highperformance.conf httpd.conf magic ssl.conf
highperformance-std.conf httpd-std.conf mime.types ssl-std.conf

add something like the following to your web server httpd.conf

ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory “/usr/local/nagios/sbin”>
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all

Alias /nagios /usr/local/nagios/share
<Directory “/usr/local/nagios/share”>
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all

[root@localhost conf]# vi httpd.conf
:
:
:

ServerAdmin [email protected]

DocumentRoot /www/docs/dummy-host.example.com

ServerName dummy-host.example.com

ErrorLog logs/dummy-host.example.com-error_log

CustomLog logs/dummy-host.example.com-access_log common

#

ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory “/usr/local/nagios/sbin”>
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all

Alias /nagios /usr/local/nagios/share
<Directory “/usr/local/nagios/share”>
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all

:wq ENTER

[root@localhost conf]# /etc/rc.d/init.d/httpd restart
Stopping httpd: OK ]
Starting httpd: OK ]
[root@localhost conf]#

I typed ](http://)/ on another PC connected to linux
then the test page for apache appeared,
And I typed ](http://)/nagios
A error page of

check your apache error logs and I’m sure you will find something about mysql user in there.
tail -f whereveryourlogfileis
then go to the nagios site and see what error pops up in tail.

btw, you are working on the same problem in 2 threads. Please don’t do that.

turn off selinux firewall at least until you know how to configure it.
applications/system settings/security level

for the present ,I have had access to the ](http://)/nagios.
but some following contents appeared when I clicked on the options on the left of the nagiosweb,

for example: I clicked on Tactical overview


Whoops!
Error: Could not read object configuration data!

Here are some things you should check in order to resolve this error:

Verify configuration options using the -v command-line option to check for errors.
Check the Nagios log file for messages relating to startup or status data errors.
Make sure you’ve compiled the main program and the CGIs to use the same object data storage options (i.e. default text file or template-based file).

Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at nagios.org.


how can I get access to the true web(CGI) when I click on the options on the left of the nagios web.

thank you!

Minquan

for the present ,I have had access to the ](http://)/nagios.
but some following contents appeared when I clicked on the options on the left of the nagiosweb,

for example: I clicked on Tactical overview


Whoops!
Error: Could not read object configuration data!

Here are some things you should check in order to resolve this error:

Verify configuration options using the -v command-line option to check for errors.
Check the Nagios log file for messages relating to startup or status data errors.
Make sure you’ve compiled the main program and the CGIs to use the same object data storage options (i.e. default text file or template-based file).

Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at nagios.org.


how can I get access to the true web(CGI) when I click on the options on the left of the nagios web.

thank you!

Minquan

nagios is not running.
ps -ef|grep nagios

now I can access ](http://)/nagios.
a authentication box appeared when I clicked on the options on the left of the nagiosweb, but I tpyed the username and password added using the following command


[root@localhost etc]# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
New password:
Re-type new password:
Updating password for user nagiosadmin


but the username and password did not take affect

why?

does intelligent installing tool for nagios exist on the Internet?

did you tell apache to look for that exact file location?

and PLEASE do not create more threads with the same question.

Luca

From the documentation,

Edited Tue Aug 02 2005, 10:28AM ]

thanks for your answer ,Luca,tell the apache to look for the exact file location?can you tell me how I do it.
I have done it per the docs!

Minquan

in the httpd.conf or in a .htaccess file you are telling apache you want a basic user authentication for the nagios area.
There you have told apache to make the authentication against the data in the htpasswd.users file. Is the file location correct?

Luca

Luca,I have not ever resolved my problem that the username and password didnot take effect.has anyone encountered the same thing?
no I chould pass the check using /usr/local/nagios/bin/nagios -v nagios.cfg
then I started the nagios using /usr/local/nagios/bin/nagios nagios.cfg

the following displayed:


[root@localhost etc]# /usr/local/nagios/bin/nagios nagios.cfg

Nagios 2.0b3
Copyright © 1999-2005 Ethan Galstad (www.nagios.org)
Last Modified: 04-03-2005
License: GPL

Nagios 2.0b3 starting… (PID=29120)

/usr/local/nagios/libexec/check_procs: option requires an argument – s
/usr/local/nagios/libexec/check_procs: option requires an argument – s
/usr/local/nagios/libexec/check_procs: option requires an argument – s
/usr/local/nagios/libexec/check_procs: option requires an argument – s
/usr/local/nagios/libexec/check_procs: option requires an argument – s
/usr/local/nagios/libexec/check_procs: option requires an argument – s


can anyone help me?
thank you!

Minquan

Huh?

The reason you get the woops page is because nagios is NOT RUNNING.

" no I chould pass the check using /usr/local/nagios/bin/nagios -v nagios.cfg
then I started the nagios using /usr/local/nagios/bin/nagios nagios.cfg "

Give us the URL to the documentation that states to start nagios in that way? I’m done helping you unless you comply with my request.

You have stated that you read the docs, that you are following the docs, you have started this topic in several threads, but yet you say you started nagios like that?
" no I chould pass the check using /usr/local/nagios/bin/nagios -v nagios.cfg
then I started the nagios using /usr/local/nagios/bin/nagios nagios.cfg "
Nowhere in the docs does that appear. Now please stop, step back, and begin again on page 1 of the documentation and perform the steps given.

" /usr/local/nagios/libexec/check_procs: option requires an argument – s "
That sounds like you configured the check_procs without an argument of -s, but hey, I could be wrong. Why would you start with such a hard check plugin, when you haven’t even gotten nagios started yet?

hello.here is the URL,

nagios.sourceforge.net/docs/2_0/ … onfig.html
nagios.sourceforge.net/docs/2_0/starting.html

but,the first

hello.here is the URL,

nagios.sourceforge.net/docs/2_0/ … onfig.html
nagios.sourceforge.net/docs/2_0/starting.html

but,the first thing

I am soryy,
but the first thing is why didnot I use the username and password created earlier when I entered the mywebserverip/nagios
I am very confused!

my god!,I can pass the authentication!