public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] nagios & cgi.cfg
@ 2006-02-15 17:20 Arnau Bria Ramírez
  2006-02-16 10:03 ` Herman Grootaers
  0 siblings, 1 reply; 8+ messages in thread
From: Arnau Bria Ramírez @ 2006-02-15 17:20 UTC (permalink / raw
  To: gentoo-user

Hi,

I've installed nagios on my gentoo box and after some time of configuration I
pointed my web-browser to localhost/nagios and found 
Error: Could not open CGI config file '/etc/nagios/cgi.cfg' for reading! error
message.

So I check file permission:

SrLobo nagios # pwd
/etc/nagios
SrLobo nagios # ls -lsa cgi.cfg 
20 -rw-r--r--  1 root root 17161 feb 15 16:06 cgi.cfg

and I think they're ok (I also tried with 777), but I still have the error
message.

Nagios is ok:

SrLobo nagios # /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg
[...]

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check

Could anyone help me, please?

Cheers!

-- 
Arnau Bria

Si no me sube el sueldo, le diré a los demás que me lo ha subido
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] nagios & cgi.cfg
  2006-02-15 17:20 [gentoo-user] nagios & cgi.cfg Arnau Bria Ramírez
@ 2006-02-16 10:03 ` Herman Grootaers
  2006-02-16 11:26   ` Arnau Bria Ramírez
  0 siblings, 1 reply; 8+ messages in thread
From: Herman Grootaers @ 2006-02-16 10:03 UTC (permalink / raw
  To: gentoo-user

On Wednesday 15 February 2006 18:20, Arnau Bria Ramírez wrote:
> Hi,
>
> I've installed nagios on my gentoo box and after some time of
> configuration I pointed my web-browser to localhost/nagios and found
> Error: Could not open CGI config file '/etc/nagios/cgi.cfg' for
> reading! error message.
>
> So I check file permission:
>
> SrLobo nagios # pwd
> /etc/nagios
> SrLobo nagios # ls -lsa cgi.cfg
> 20 -rw-r--r--  1 root root 17161 feb 15 16:06 cgi.cfg
>
> and I think they're ok (I also tried with 777), but I still have the
> error message.
>
> Nagios is ok:
>
> SrLobo nagios # /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg
> [...]
>
> Total Warnings: 0
> Total Errors:   0
>
> Things look okay - No serious problems were detected during the
> pre-flight check
>
> Could anyone help me, please?
>

You just tested the configuration of nagios. To start it run either the 
startscript in /etc/init.d, or if it does not exists with the same 
command replacing the -v with -d. That should start nagios, and start 
also the output on the webpage.

Note, that the startup-time for nagios is depending on the number of 
tests to be done and the time between two successive tests.

Success.
-- 
Herman Grootaers

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] nagios & cgi.cfg
  2006-02-16 10:03 ` Herman Grootaers
@ 2006-02-16 11:26   ` Arnau Bria Ramírez
  2006-02-16 13:37     ` Herman Grootaers
  0 siblings, 1 reply; 8+ messages in thread
From: Arnau Bria Ramírez @ 2006-02-16 11:26 UTC (permalink / raw
  To: gentoo-user

El Thu, 16 Feb 2006 11:03:12 +0100
Herman Grootaers dijo:
 
> You just tested the configuration of nagios. To start it run either the 
> startscript in /etc/init.d, or if it does not exists with the same 
> command replacing the -v with -d. That should start nagios, and start 
> also the output on the webpage.

SrLobo nagios # /etc/init.d/nagios status
 * Caching service
dependencies ...                                                          [ ok ]
 * status:  started

Sorry, I had to copy this output too. 

> Note, that the startup-time for nagios is depending on the number of 
> tests to be done and the time between two successive tests.
Well, I think Nagios "itself" is working fine:

SrLobo nagios # cat nagios.log
[1140048000] LOG ROTATION: DAILY
[1140051357] Auto-save of retention data completed successfully.
[1140054957] Auto-save of retention data completed successfully.
[1140058557] Auto-save of retention data completed successfully.
[1140062157] Auto-save of retention data completed successfully.
[1140065757] Auto-save of retention data completed successfully.
[1140069357] Auto-save of retention data completed successfully.
[1140072957] Auto-save of retention data completed successfully.
[1140076557] Auto-save of retention data completed successfully.
[1140079834] Caught SIGTERM, shutting down...
[1140079835] Nagios 1.3 starting... (PID=10161)
[1140079835] Successfully shutdown... (PID=7217)
[1140079835] Finished daemonizing... (New PID=10162)
[1140083435] Auto-save of retention data completed successfully.
[1140087035] Auto-save of retention data completed successfully.

SrLobo nagios # cat status.log 
# Nagios 1.3 Status File
[1140089030] PROGRAM;1140079835;10162;1;0;0;1;1;1;1;0;0;1;0
[1140089030]
HOST;Afrodita;UP;1140079902;1140022624;0;57211;0;0;0;0;1;1;1;1;0;0.00;0;1;1;(Host
assumed to be up) [1140089030]
SERVICE;Afrodita;HTTP;OK;1/3;HARD;1140088903;1140089203;ACTIVE;1;1;1;1140022624;0;OK;57211;0;0;0;0;0;1;0;0;1;0;0.00;0;1;1;1;HTTP
OK HTTP/1.1 200 OK - 798 bytes in 0.003 seconds [1140089030]
SERVICE;Afrodita;PING;OK;1/3;HARD;1140088971;1140089271;ACTIVE;1;1;1;1140022692;0;OK;57143;0;0;0;0;0;1;0;4;1;0;0.00;0;1;1;1;PING
OK - Packet loss = 0%, RTA = 0.33 ms [1140089030]
SERVICE;Afrodita;POP3;OK;1/3;HARD;1140088737;1140089037;ACTIVE;1;1;1;1140022759;0;OK;57076;0;0;0;0;0;1;0;0;1;0;0.00;0;1;1;1;POP
OK - 0,017 second response time on port 110 [+OK afrodita Cyrus POP3
v2.1.18-IPv6-Debian-2.1.18-3 server ready <1917919003.1140085158@afrodita>]
[1140089030]
SERVICE;Afrodita;SMTP;OK;1/3;HARD;1140088925;1140089105;ACTIVE;1;1;1;1140022827;0;OK;57008;0;0;0;0;0;1;0;0;1;0;0.00;0;1;1;1;SMTP
OK - 0,054 sec. response time


It's just web that doesn't work...

Thanks for your help!
> Success.
> -- 
> Herman Grootaers
Cheers!
-- 
Arnau Bria

Si no me sube el sueldo, le diré a los demás que me lo ha subido
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] nagios & cgi.cfg
  2006-02-16 11:26   ` Arnau Bria Ramírez
@ 2006-02-16 13:37     ` Herman Grootaers
  2006-02-16 16:46       ` Arnau Bria Ramírez
  0 siblings, 1 reply; 8+ messages in thread
From: Herman Grootaers @ 2006-02-16 13:37 UTC (permalink / raw
  To: gentoo-user

On Thursday 16 February 2006 12:26, Arnau Bria Ramírez wrote:
> El Thu, 16 Feb 2006 11:03:12 +0100
>
> Herman Grootaers dijo:
> > You just tested the configuration of nagios. To start it run either
> > the startscript in /etc/init.d, or if it does not exists with the
> > same command replacing the -v with -d. That should start nagios,
> > and start also the output on the webpage.
>
> SrLobo nagios # /etc/init.d/nagios status
>  * Caching service
> dependencies ...                                                     
>     [ ok ] * status:  started
>
> Sorry, I had to copy this output too.
>
> > Note, that the startup-time for nagios is depending on the number
> > of tests to be done and the time between two successive tests.
>
> Well, I think Nagios "itself" is working fine:
>
> SrLobo nagios # cat nagios.log
> [1140048000] LOG ROTATION: DAILY
> [1140051357] Auto-save of retention data completed successfully.
> [1140054957] Auto-save of retention data completed successfully.
> [1140058557] Auto-save of retention data completed successfully.
> [1140062157] Auto-save of retention data completed successfully.
> [1140065757] Auto-save of retention data completed successfully.
> [1140069357] Auto-save of retention data completed successfully.
> [1140072957] Auto-save of retention data completed successfully.
> [1140076557] Auto-save of retention data completed successfully.
> [1140079834] Caught SIGTERM, shutting down...
> [1140079835] Nagios 1.3 starting... (PID=10161)
> [1140079835] Successfully shutdown... (PID=7217)
> [1140079835] Finished daemonizing... (New PID=10162)
> [1140083435] Auto-save of retention data completed successfully.
> [1140087035] Auto-save of retention data completed successfully.
>
> SrLobo nagios # cat status.log
> # Nagios 1.3 Status File
> [1140089030] PROGRAM;1140079835;10162;1;0;0;1;1;1;1;0;0;1;0
> [1140089030]
> HOST;Afrodita;UP;1140079902;1140022624;0;57211;0;0;0;0;1;1;1;1;0;0.00
>;0;1;1;(Host assumed to be up) [1140089030]
> SERVICE;Afrodita;HTTP;OK;1/3;HARD;1140088903;1140089203;ACTIVE;1;1;1;
>1140022624;0;OK;57211;0;0;0;0;0;1;0;0;1;0;0.00;0;1;1;1;HTTP OK
> HTTP/1.1 200 OK - 798 bytes in 0.003 seconds [1140089030]
> SERVICE;Afrodita;PING;OK;1/3;HARD;1140088971;1140089271;ACTIVE;1;1;1;
>1140022692;0;OK;57143;0;0;0;0;0;1;0;4;1;0;0.00;0;1;1;1;PING OK -
> Packet loss = 0%, RTA = 0.33 ms [1140089030]
> SERVICE;Afrodita;POP3;OK;1/3;HARD;1140088737;1140089037;ACTIVE;1;1;1;
>1140022759;0;OK;57076;0;0;0;0;0;1;0;0;1;0;0.00;0;1;1;1;POP OK - 0,017
> second response time on port 110 [+OK afrodita Cyrus POP3
> v2.1.18-IPv6-Debian-2.1.18-3 server ready
> <1917919003.1140085158@afrodita>] [1140089030]
> SERVICE;Afrodita;SMTP;OK;1/3;HARD;1140088925;1140089105;ACTIVE;1;1;1;
>1140022827;0;OK;57008;0;0;0;0;0;1;0;0;1;0;0.00;0;1;1;1;SMTP OK - 0,054
> sec. response time
>

So Nagios is started correctly.

Now another question: is apache running and if so is there an entry in 
the apache-configuration for the nagios web-site?

You must realize that the output of nagios does have to be parsed to a 
webserver, before you can see it on the screen with your browser.

I hope this helped.
-- 
Herman Grootaers

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] nagios & cgi.cfg
  2006-02-16 13:37     ` Herman Grootaers
@ 2006-02-16 16:46       ` Arnau Bria Ramírez
  2006-02-17 10:29         ` [gentoo-user] nagios & cgi.cfg SOLVED Arnau Bria Ramírez
  0 siblings, 1 reply; 8+ messages in thread
From: Arnau Bria Ramírez @ 2006-02-16 16:46 UTC (permalink / raw
  To: gentoo-user

El Thu, 16 Feb 2006 14:37:10 +0100
Herman Grootaers dijo:

> 
> So Nagios is started correctly.

Sure, and it send emails correctly. (it found my smtp server down during a
reboot)

> Now another question: is apache running and if so is there an entry in 
> the apache-configuration for the nagios web-site?

Yep. (apache2) I followed next doc: http://en.gentoo-wiki.com/Nagios. it talks
about nagios 2.0, and I have 1.3. Main conf is the same.

The only thing is different from the doc is .htaccess.
It does not work for me (I don't really know why, I'll look for it later).

[Thu Feb 16 16:38:12 2006] [error] [client 127.0.0.1] (13)Permission denied:
Could not open password file: /usr/nagios/etc/htpasswd.users, referer:
http://127.0.0.1/nagios/side.html 

# ls -lsa /usr/nagios/etc/htpasswd.users
4 -rw-r-----  1 apache apache 67 feb 16 16:06 /usr/nagios/etc/htpasswd.users

For this reason I moved .htacces to .htaccess.old

> You must realize that the output of nagios does have to be parsed to a 
> webserver, before you can see it on the screen with your browser.

Sure, I understand the main behaivour of nagios. I had it running on a Debian.
I can go into localhost/nagios. then, when I click Tactical Overview (i.e.) it
just show: 

Whoops!

Error: Could not open CGI config file '/etc/nagios/cgi.cfg' for reading!

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

   1. Make sure you've installed a CGI config file in its proper location. See
the error message about for details on where the CGI is expecting to find the
configuration file. A sample CGI configuration file (named cgi.cfg) can be
found in the sample-config/ subdirectory of the Nagios source code
distribution. 2. Make sure the user your web server is running as has
permission to read the CGI config file. 

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

> I hope this helped.
An answer always help!

Cheers!

-- 
Arnau Bria

¿Vienes a mi casa, el día de la boda de mi hija a pedirme que mate por dinero? 
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] nagios & cgi.cfg SOLVED
  2006-02-16 16:46       ` Arnau Bria Ramírez
@ 2006-02-17 10:29         ` Arnau Bria Ramírez
  2006-02-17 13:53           ` Herman Grootaers
  0 siblings, 1 reply; 8+ messages in thread
From: Arnau Bria Ramírez @ 2006-02-17 10:29 UTC (permalink / raw
  To: gentoo-user

El Thu, 16 Feb 2006 16:46:23 +0000
Arnau Bria Ramírez dijo:

In order to let apache move into nagios directories, I add to include apache
into nagios group.

All my problems moved away!

Many thanks to all how read this threat!

Cheers!
Arnau
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] nagios & cgi.cfg SOLVED
  2006-02-17 10:29         ` [gentoo-user] nagios & cgi.cfg SOLVED Arnau Bria Ramírez
@ 2006-02-17 13:53           ` Herman Grootaers
  2006-02-20  9:19             ` Arnau Bria Ramírez
  0 siblings, 1 reply; 8+ messages in thread
From: Herman Grootaers @ 2006-02-17 13:53 UTC (permalink / raw
  To: gentoo-user

On Friday 17 February 2006 11:29, Arnau Bria Ramírez wrote:
> El Thu, 16 Feb 2006 16:46:23 +0000
> Arnau Bria Ramírez dijo:
>
> In order to let apache move into nagios directories, I add to include
> apache into nagios group.
>
> All my problems moved away!
>
> Many thanks to all how read this threat!

Stupid of me not to think about this. It is so simple afterwards to 
think about it, but I was not on my work when I was reading this 
thread.

I had Nagios running for 59 servers and over 400 tests, it took an hour 
(yes 3600 seconds) to give accurate results about the machines; and I 
am still no Nagios-guru.

thanks
-- 
Herman Grootaers


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] nagios & cgi.cfg SOLVED
  2006-02-17 13:53           ` Herman Grootaers
@ 2006-02-20  9:19             ` Arnau Bria Ramírez
  0 siblings, 0 replies; 8+ messages in thread
From: Arnau Bria Ramírez @ 2006-02-20  9:19 UTC (permalink / raw
  To: gentoo-user

El Fri, 17 Feb 2006 14:53:05 +0100
Herman Grootaers dijo:

> 
> Stupid of me not to think about this. It is so simple afterwards to 
> think about it, but I was not on my work when I was reading this 
> thread.

Do be so critic with you! It's normal to not control all variables of other's
installation!
 
> I had Nagios running for 59 servers and over 400 tests, it took an hour 
> (yes 3600 seconds) to give accurate results about the machines; and I 
> am still no Nagios-guru.

Nagios is so big ...

> 
> thanks

Thanks to you!
-- 
Arnau Bria

¿Vienes a mi casa, el día de la boda de mi hija a pedirme que mate por dinero? 
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-02-20  8:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-15 17:20 [gentoo-user] nagios & cgi.cfg Arnau Bria Ramírez
2006-02-16 10:03 ` Herman Grootaers
2006-02-16 11:26   ` Arnau Bria Ramírez
2006-02-16 13:37     ` Herman Grootaers
2006-02-16 16:46       ` Arnau Bria Ramírez
2006-02-17 10:29         ` [gentoo-user] nagios & cgi.cfg SOLVED Arnau Bria Ramírez
2006-02-17 13:53           ` Herman Grootaers
2006-02-20  9:19             ` Arnau Bria Ramírez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox