Nagios 2.0b3 configuration problems


#1

Hi all
im new to this site and the main reason why i joined is because im having problems starting Nagios, the monitoring tool. I am using Fedora Core 3 and i downloaded the gd library and all the required softwares (Hope i did :? ) I downloaded the tarball version of Nagios2.0b3 and then followed the instructions given in the documentation. When i launched Nagios from my apache browser i got the Nagios main page. But when i tried to click on one of the links (host detail, status map,…) i received the following message:
**Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.0.52 (Fedora) Server at 127.0.0.1 Port 80
**

In the error log i am receiving the following:

[Wed Jul 06 07:46:49 2005] [error] [client 127.0.0.1] (13)Permission denied: exec of ‘/usr/local/nagios/sbin/status.cgi’ failed, referer: 127.0.0.1/nagios/side.html
[Wed Jul 06 07:46:49 2005] [error] [client 127.0.0.1] Premature end of script headers: status.cgi, referer: 127.0.0.1/nagios/side.html
[Wed Jul 06 07:46:49 2005] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico

I checked my permissions and my httpd.conf configurations and they seem ok. I specified that nagios2 (which is the user that i specified in “chown nagios2.nagios2 /usr/local/nagios”) has r/w permission to all cgi files. In my httpd.conf i wrote :

**ScriptAlias /nagios/cgi-bin “/usr/local/nagios/sbin”
<Directory “/usr/local/nagios/sbin”>

SSLRequireSSL

AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all

Order deny,allow

Deny from all

Allow from 127.0.0.1

Alias /nagios “/usr/local/nagios/share”
<Directory “/usr/local/nagios/share”>

SSLRequireSSL

Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all

Order deny,allow

Deny from all

Allow from 127.0.0.1

**

Where’s the problem??? I would really appreciate your help and i hope ill get a reply soon. Thanks


#2

Hi,
i had the same problem.
Turn off SELinux. It will be ok.
Good luck.
Bye.


#3

hey
thx 4 ur reply
I turned SELinux off (etc/selinux -->vi config --> selinux=disabled right?) but im still receiving the same error
Any idea?


#4

hey
sorry i restarted my system and then tried again and it qorked, the errors stopped showing
now i still have one error in the error_log:

[Wed Jul 06 11:25:25 2005] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico

And in the browser im receiving:

Whoops!

Error: Could not read object configuration data!

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

  1. Verify configuration options using the -v command-line option to check for errors.
  2. Check the Nagios log file for messages relating to startup or status data errors.
  3. 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.

Thanks again for ur help


#5

how do you turn off SELinux?


#6

the favicon missing has nothing to do with your error. nagios itself is tellign you what to do…
check your configs and try again… if it doesn’t work the usual recommendation applies. read the docs and try compiling from source :slight_smile:

Luca

Luca


#7

This is weird. I experienced the same problem today…

I know this isn’t the right solution… but if you move the cgi files to your apache cgi root, which for me is /var/www/cgi-bin … they load fine. It’s something to do with apache configuration, and yes i set the conf file up exactly like the docs asked.


#8

Hey
I rechecked my configs and it was simply a problem of user authentication. Now nagios works well, all the cgis are being loaded except the status map and 3-D status map.
When i click on status map i ameceiving:
Not Found
The requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server

When i click on 3D status map i receive a window:
Opening statuswrl.cgi and 2 opions open with or save to disk

What should i do???


#9

Another question guys and thats really embarressing but once nagios is well configured (which i still havent done yet) how do i work with it?? Does it have an auto network discovery?? pls help, im running out of time!!


#10

Nagios is a Network Monitoring Tool.You need to monitor the services and host ,switches,routers etc.almost you can monitor anything which has an Address.

You can get various types of reports of services,host or hostgroups.
Also you can schedule downtime or restart service from nagios.

For more details you will get them in docs.Just handle nagios for a couple of days and then you will be clear with exactly you can do with it.

Thanks


#11

[quote=“Patrick-N”]Hey
I rechecked my configs and it was simply a problem of user authentication. Now nagios works well, all the cgis are being loaded except the status map and 3-D status map.
When i click on status map i ameceiving:
Not Found
The requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server

When i click on 3D status map i receive a window:
Opening statuswrl.cgi and 2 opions open with or save to disk

What should i do??? [/quote]

if “file not found” is the error, then check.
ls -la [root@tia3407 etc]# ls -la /usr/local/nagios/sbin
total 2304
drwxrwxr-x 2 nagios nagios 4096 Jun 27 16:06 .
drwxr-xr-x 9 root root 4096 Jun 27 13:27 …
-rwxrwxr-x 1 nagios nagios 147324 Jun 27 15:19 avail.cgi
-rwxrwxr-x 1 nagios nagios 156444 Jun 27 15:19 cmd.cgi
-rwxrwxr-x 1 nagios nagios 117884 Jun 27 15:19 config.cgi
-rwxrwxr-x 1 nagios nagios 170844 Jun 27 15:19 extinfo.cgi
-rwxrwxr-x 1 nagios nagios 129660 Jun 27 15:19 histogram.cgi
-rwxrwxr-x 1 nagios nagios 111020 Jun 27 15:19 history.cgi
-rw-r–r-- 1 nagios nagios 110 Jun 5 14:07 .htaccess
-rwxrwxr-x 1 nagios nagios 107084 Jun 27 15:19 notifications.cgi
-rwxrwxr-x 1 nagios nagios 109116 Jun 27 15:19 outages.cgi
-rwxrwxr-x 1 nagios nagios 106572 Jun 27 15:19 showlog.cgi
-rwxrwxr-x 1 nagios nagios 154364 Jun 27 15:19 status.cgi
-rwxrwxr-x 1 nagios nagios 133884 Jun 27 15:19 statusmap.cgi
-rwxrwxr-x 1 nagios nagios 121340 Jun 27 15:19 statuswml.cgi
-rwxrwxr-x 1 nagios nagios 114780 Jun 27 15:19 statuswrl.cgi
-rwxrwxr-x 1 nagios nagios 125436 Jun 27 15:19 summary.cgi
-rwxrwxr-x 1 nagios nagios 133820 Jun 27 15:19 tac.cgi
-rwxrwxr-x 1 nagios nagios 296043 Jun 27 16:05 trends.cgi

check your permission’s on the files also.

The 3d problem is due to your browser not knowing how to handle a 3d webpage. You will need to install a plugin or something for your browser.
I wouldn’t worry about that at this time, since you have bigger fish to fry. Get the statusmap.cgi working first.


#12

[quote=“Patrick-N”]Another question guys and thats really embarressing but once nagios is well configured (which i still havent done yet) how do i work with it?? Does it have an auto network discovery?? pls help, im running out of time!!
[/quote]

Nagios will not be configured until you have done just that. It will not auto discover as some $10,000 commmercial apps will do. The good thing about nagios is, it forces you, as a technician, to go out into your network, and discover how it is setup. Switch1 connects to switch2 using port1 to port24, etc.

When you are done, nagios should be showing you everthing that you have figured out, on your own. It won’t do it for you.


#13

TENGO EL MISMO PROBLEM


#14

hey
well the statusmap.cgi doesnt appear in my CGIs. (nagios/sbin) I only have statusmap.c in /root/nagios-2.0b3/cgi. I guess it’s a compilation problem, right?


#15

possibly nagios complained about missing GD Libraries during the configure phase?

Luca


#16

Depends on the gd if u are using the lastest gd version files some of the file names are a bit different. Thus nagios is unable to find it. U’ll have to setup a link to the files. Had this problem before. Was a pain man, took me quite a while to solve it.


#17

well i gave up and im reinstalling fedora with all the packages which should install all the nagios necessary libraries. ill let u know of the outcome. Thx every1


#18

Sounds like a solution but…
Anyway, you could have just compiled again, and taken a look at the text displayed during the ./configure. It might have stated something like "statusmap.cgi will not be used, since you don’t have ?? library installed, see www.somewebsite to get them.

The ./configure script is actually very helpful with it’s discovery and might have told you exactly what you needed to install.


#19

Its finally working! Guess starting all over again was the best thing 2 do! :stuck_out_tongue: So all the cgi’s r working, including the 3-D statusmap. Now im working on the integration of the net-snmp with nagios in order 2 receive snmp traps. I found the instructions on the web, but any help is highly appreciated! Thx


#20

Yes it is a good thing to do. People will learn quickly to watch the ./configure more closely the second time around, looking for what it complains about, and paying attention to what it suggests you do.