2

I have a Wheezy Debian system, and I've installed nagios3 using apt-get. When I go to myhost.com/nagios3 and then go to a page, for example "Tactical Overview" I get the error message:

The requested URL /cgi-bin/nagios3/tac.cgi was not found on this server.

which is odd.

These lines are in /etc/apache2/conf.d/nagios3.conf:

ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3

And this is output of ls /usr/lib/cgi-bin/nagios3:

avail.cgi        config.cgi     graphs.cgi     history.cgi       outages.cgi
rrd2-system.cgi  status.cgi     statuswml.cgi  summary.cgi       trends.cgi
cmd.cgi          extinfo.cgi    histogram.cgi  notifications.cgi rrd2-graph.cgi  
showlog.cgi      statusmap.cgi  statuswrl.cgi  tac.cgi   

What's going on here?

UPDATE:
as @slm has said, i've checked apache log files after trying to open the faulty page, and this is what i can see in access.log:

127.0.0.1 - - [16/Aug/2013:09:04:23 -0400] "GET / HTTP/1.1" 200 494 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"

and i've changed the log level of error.log to debug, but when i search for nagios or perl in it I get nothing.

1

Check the Apache logs for additional information. There's typically 2 logs, access.log and error.log. Both can be helpful. The access.log will show you the URL that was accessed along with a http status (a number such as 200 which means OK or 404 which means error).

The error log can show you output from any CGI scripts that may have failed. Typically the CGI script is either not configured correctly or libraries it needs are missing. Since Nagios is Perl based it might be missing Perl modules, for example.

  • thanx buddy, i've updated the question. – sazary Aug 16 '13 at 13:15
  • @sazary - OK so the fact that it's returning a 200 in the logs means that Apache is able to service the request just fine. The script that's having issues is check_http, I would look in the nagios log files for additional info now. – slm Aug 16 '13 at 13:17
  • where are they? i've looked at /var/log/nagios3/nagios.log but it had no error. and i've checked /etc/nagios3/nagios.cfg and every log configuration has been set to 1. also, ps aux | grep check_http returns nothing, either does whereis check_http. – sazary Aug 16 '13 at 13:26
  • @sazary - the plugins aren't usually on the path. Try the command locate check_http. You can also find out where they are by looking in the nagios.cfg. – slm Aug 16 '13 at 13:43
  • That's not it. check_http is the user agent string of the nagios plugin that verifies your webserver is still running. You need to find an entry for your browser, not for check_http – Wouter Verhelst Jul 4 '15 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.