Got in Nagios web interface but every link I click on shows this:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] 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.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I haven’t done anything on this page yet except this command:
/usr/local/apache/bin/htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
nagios.sourceforge.net/docs/2…nfig_web_users
I could not really understand everything starting from…
“Enabling Authentication/Authorization Functionality In The CGIs”
Perhaps you can please explain this to me, I’m guessing having not done this portion yet is probably why I’m getting the errors when clicking on the links
Apache error logs
[Mon Jul 3 22:17:24 2006] [error] [client xx.xxx.97.5] Premature end of script headers: /usr/local/nagios/sbin/status.cgi
[Mon Jul 3 22:17:24 2006] [error] [client xx.xxx.97.5] File does not exist: /home/user/public_html/500.shtml
[Mon Jul 3 22:17:24 2006] [error] [client xx.xxx.97.5] Premature end of script headers: /usr/local/nagios/sbin/status.cgi
[Mon Jul 3 22:17:24 2006] [error] [client xx.xxx.97.5] File does not exist: /home/user/public_html/500.shtml
[Mon Jul 3 22:17:25 2006] [error] [client xx.xxx.97.5] Premature end of script headers: /usr/local/nagios/sbin/tac.cgi
[Mon Jul 3 22:17:25 2006] [error] [client xx.xxx.97.5] File does not exist: /home/user/public_html/500.shtml
[Mon Jul 3 22:17:29 2006] [error] [client xx.xxx.97.5] Premature end of script headers: /usr/local/nagios/sbin/extinfo.cgi
[Mon Jul 3 22:17:29 2006] [error] [client xx.xxx.97.5] File does not exist: /home/user/public_html/500.shtml
[Mon Jul 3 22:17:29 2006] [error] [client xx.xxx.97.5] Premature end of script headers: /usr/local/nagios/sbin/extinfo.cgi
[Mon Jul 3 22:17:29 2006] [error] [client xx.xxx.97.5] File does not exist: /home/user/public_html/500.shtml
[Mon Jul 3 22:17:51 2006] [error] [client xx.xxx.97.5] Premature end of script headers: /usr/local/nagios/sbin/tac.cgi
[Mon Jul 3 22:17:51 2006] [error] [client xx.xxx.97.5] File does not exist: /home/user/public_html/500.shtml
[Mon Jul 3 22:17:52 2006] [error] [client xx.xxx.97.5] Premature end of script headers: /usr/local/nagios/sbin/tac.cgi
[Mon Jul 3 22:17:52 2006] [error] [client xx.xxx.97.5] File does not exist: /home/user/public_html/500.shtml
Error:
root@server [/usr/local/nagios/etc]# /usr/local/nagios/bin/nagios -v nagios.cfg
Nagios 2.4
Copyright © 1999-2006 Ethan Galstad (nagios.org)
Last Modified: 05-31-2006
License: GPL
Reading configuration data…
Running pre-flight check on configuration data…
Checking services…
Error: There are no services defined!
Checked 0 services.
Checking hosts…
Error: There are no hosts defined!
Checked 0 hosts.
Checking host groups…
Error: There are no host groups defined!
Checked 0 host groups.
Checking service groups…
Checked 0 service groups.
Checking contacts…
Error: There are no contacts defined!
Checked 0 contacts.
Checking contact groups…
Error: There are no contact groups defined!
Checked 0 contact groups.
Checking service escalations…
Checked 0 service escalations.
Checking service dependencies…
Checked 0 service dependencies.
Checking host escalations…
Checked 0 host escalations.
Checking host dependencies…
Checked 0 host dependencies.
Checking commands…
Checked 22 commands.
Checking time periods…
Checked 0 time periods.
Checking extended host info definitions…
Checked 0 extended host info definitions.
Checking extended service info definitions…
Checked 0 extended service info definitions.
Checking for circular paths between hosts…
Checking for circular host and service dependencies…
Checking global event handlers…
Checking obsessive compulsive processor commands…
Checking misc settings…
Total Warnings: 0
Total Errors: 5
***> One or more problems was encountered while running the pre-flight check…
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
’Whats New’ section to find out what has changed.
I saw that in nagios.cfg it shows this:
OBJECT CONFIGURATION FILE(S)
This is the configuration file in which you define hosts, host
groups, contacts, contact groups, services, etc. I guess it would
be better called an object definition file, but for historical
reasons it isn’t. You can split object definitions into several
different config files by using multiple cfg_file statements here.
Nagios will read and process all the config files you define.
This can be very useful if you want to keep command definitions
separate from host and contact definitions…
Plugin commands (service and host check commands)
Arguments are likely to change between different releases of the
plugins, so you should use the same config file provided with the
plugin release rather than the one provided with Nagios.
cfg_file=/usr/local/nagios/etc/checkcommands.cfg
Misc commands (notification and event handler commands, etc)
cfg_file=/usr/local/nagios/etc/misccommands.cfg
You can split other types of object definitions across several
config files if you wish (as done here), or keep them all in a
single config file.
#cfg_file=/usr/local/nagios/etc/minimal.cfg
#cfg_file=/usr/local/nagios/etc/contactgroups.cfg
#cfg_file=/usr/local/nagios/etc/contacts.cfg
#cfg_file=/usr/local/nagios/etc/dependencies.cfg
#cfg_file=/usr/local/nagios/etc/escalations.cfg
#cfg_file=/usr/local/nagios/etc/hostgroups.cfg
#cfg_file=/usr/local/nagios/etc/hosts.cfg
#cfg_file=/usr/local/nagios/etc/services.cfg
#cfg_file=/usr/local/nagios/etc/timeperiods.cfg
The above cfg files do not exist by default and this is where I am confused to what the lines should look like in each file. I saw this link nagios.sourceforge.net/docs/2…te_host_checks but I’m not 100% sure on this.
Can someone at least give me one example per file (the above)? I think that should help me out.