Missing files?


I get the following msg when verifying my nagios installation:

Error in configuration file ‘/usr/local/nagios/etc/nagios.cfg’ - Line 78 (UNKNOWN VARIABLE)
Line 78 reads:

I’ve looked in the the dir the file is supposed to be in, only to find a empty folder! I’ve never had this problem before - and I’ve used the same file to install nagios from before so I’m not sure what the problem is!!


not sure but shouldn’t that file be created by nagios while running?



This is nagios2.0b2 right? Perhaps just touch a file and give it correct permissions would do it.

Format: object_cache_file=<file_name>
Example: object_cache_file_file=/usr/local/nagios/var/objects.cache

This directive is used to specify a file in which a cached copy of object definitions should be stored. The cache file is (re)created every time Nagios is (re)started and is used by the CGIs. It is intended to speed up config file caching in the CGIs and allow you to edit the source object config files while Nagios is running without affecting the output displayed in the CGIs.


I’m using nagios2.0 and i dont think file permissions will do the trick, theres no files in the directory /usr/local/nagios/var - even when i look at it under a su login. If i was to change the file permissions, what should I change it to?


man touch :wink:


I actually ended installing nagios2.0b2 over the top… i ran the check and it passed fine, with only 1 warning (which i know how to fi:evil: - but when actually trying to run nagios i now get this error:
Error: Could not create external command file ‘/usr/local/nagios/var/rw/nagios.cmd’ as named pipe: (2) -> No such file or directory. If this file already exists and you are sure that another copy of Nagios is not running, you should delete this file.
Bailing out due to errors encountered while trying to initialize the external command file… (PID=20819)


ok… i got nagios starting!!!
Now when trying to access the cgis via the web browser i get this:
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 Port 80

I’ve set up all required authentication as in the Documentation - but I still got the error up - before and after i did that process.
Edited Tue Apr 05 2005, 09:27AM ]


I just checked out my logs… and i got this:
[Tue Mar 15 21:54:28 2005] [error] [client] (13)Permission denied: exec of ‘/usr/local/nagios/sbin/tac.cgi’ failed, referer:

I dont know what i should set the permissions to for the cgis though!!! anyone got an idea??


nagios user and group… and the user on which apache runs has to be in the same group.



Can you give me some help on how to do this?? I’m not the most knowledgeable person on linux stuff!


start here:
nagios.sourceforge.net/docs/2_0/cgiauth.html :wink:



shouldnt i be able to access the cgis without having the authorisation set up though???


have the execution permissions been set on the directory for the user with which apache runs?



i dont know, how do i do that also??? or how do i check it out?


just to help you with ur response here is a ls -l of my sbin dir:
-rwxrwxr-x 1 nagios nagios 158100 Mar 15 21:53 avail.cgi
-rwxrwxr-x 1 nagios nagios 158904 Mar 15 21:53 cmd.cgi
-rwxrwxr-x 1 nagios nagios 121108 Mar 15 21:53 config.cgi
-rwxrwxr-x 1 nagios nagios 174552 Mar 15 21:53 extinfo.cgi
-rwxrwxr-x 1 nagios nagios 111508 Mar 15 21:53 history.cgi
-rwxrwxr-x 1 nagios nagios 107380 Mar 15 21:53 notifications.cgi
-rwxrwxr-x 1 nagios nagios 105560 Mar 15 21:53 outages.cgi
-rwxrwxr-x 1 nagios nagios 105812 Mar 15 21:53 showlog.cgi
-rwxrwxr-x 1 nagios nagios 157336 Mar 15 21:53 status.cgi
-rwxrwxr-x 1 nagios nagios 120148 Mar 15 21:53 statuswml.cgi
-rwxrwxr-x 1 nagios nagios 107412 Mar 15 21:53 statuswrl.cgi
-rwxrwxr-x 1 nagios nagios 125972 Mar 15 21:53 summary.cgi
-rwxrwxr-x 1 nagios nagios 124440 Mar 15 21:53 tac.cgi


check with which user you run the apache process, and check that that user is in the nagios group.

(somewhere in the docs it’s explained better :slight_smile: )

Ciao, Luca


i actually have the whole of the /usr/local/nagios/ dir as chmod 777 and likewise for all subfolders… so apache should be able to access it and execute it even if its not under the nagios group! so why is this still not working!


“ps -ef | grep httpd” to see the user you run Apache as. I run it as user apache but the default is user nobody. I also created nagioscmd to run external commands for me so my group entry for nagioscmd looks like this: nagioscmd:x:514:apache,nagios. Seems to work for me…


ive fixed that problem now - had to do stuff with selinux or somthing. now ive got the following error:
Error: Could not open CGI config file ‘/usr/local/nagios/etc/cgi.cfg’ for reading!

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

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.
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 at nagios.org.

The file is there, and once again the permissions are set to 777.
Any help will be appreciated!!


You really need to go over the entire documentation again. Pay close attention to nagios.sourceforge.net/docs/2_0/cgiauth.html

There have been several attempts to help you in this thread, and each time, I fail to see you reply with the results of the suggestion that we have provided. How is this helpful? Sorry, if I sound harsh, but I’m just triing to be honest. Work with us please.

Check the docs on setting up apache correctly and remember, to restart apache after any change is made.